I noticed that changing the content of /etc/environment
in Ubuntu 16.04.1 immediately updates the output of env
while doing this in Ubuntu 14.04.4 doesn't update the output of env
(which requires you to reboot/login for the changes to take effect).
I couldn't find any information on this change when I searched the Internet. Does anyone know more about how this change was implemented? And, is there a way to let Ubuntu 14.04 behave like 16.04?
Update: The exact steps I take are:
sudo vim /etc/environment
*add or remove a line*
sudo env
*check whether the line is added or removed*
env
output? I am unable to reproduce this behaviorsudo
, I think - and is a result of differences in the/etc/pam.d/sudo
configuration files. See sudo not setting environment variables in /etc/environment/etc/pam.d/sudo
file on both systems, but their appears to be no difference. Any other suggestions?auth required pam_env.so readenv=1
while the other hassession required pam_env.so readenv=1
(noteauth
versussession
)