Quantcast
Channel: Setting variable in /etc/environment has no effect - Super User
Viewing all articles
Browse latest Browse all 4

Setting variable in /etc/environment has no effect

$
0
0

I have the following in my /etc/environment:

http_proxy=http://myproxy.net:12345

After rebooting the machine, I login and check the variable:

root@d6c44fa03243:/# echo $http_proxy(empty)

Why is the variable not set?

Note: I must mention that this is a docker container, although I do not see why it would make a difference.

EDIT

More details about the system (Ubuntu 16.04.4 Xenial Xerus):

root@d6c44fa03243:/# uname -aLinux d6c44fa03243 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linuxroot@d6c44fa03243:/# cat /etc/issueUbuntu 16.04.4 LTS \n \l

EDIT2

According to the Ubuntu documentation:

/etc/environment

This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images