Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

If I set a variable in /etc/environment, it only seems to apply to administrators while in sudo su.

How can I get the variables to apply to everyone? Especially when they are in terminal? Do the settings in /etc/enviroment not apply to bash?

share|improve this question

2 Answers 2

The /etc/environment update will only work on the next session, it's not automatically reloaded.

Which means you cannot change it for sessions that have already started for other users.

If you want to "reload" whatever is in the /etc/environment you need the following command:

source /etc/environment

But again it will only work for your own current session, other users won't be affected until they start a new session or run the above command in their own session.

share|improve this answer

Adding a variable to /etc/environment did work for me.

However I did have to reboot after changing /etc/environment for the change to take effect. Simply closing and re-opening the terminal window was not sufficient.

share|improve this answer
    
You can always do a source /etc/environment to reload it. –  Panthro Aug 19 at 14:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.