How to reload /etc/environment without rebooting?
Problem
is officially the correct place for system wide environment variables. But how can I reload the assignments in this file without rebooting or relogging? Interestingly enough google does not help me here, aside from the dozens of blog posts suggesting to use which obviously will never work because is a list of assigments (one per line) and not an executable script (hence the missing commands in ...).
Error Output
source /etc/environment
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How to reload /etc/environment without rebooting?
One thing you are mistaken about is that requires a reboot to reload. This is incorrect. The only time the file is read is on login, when the PAM stack is activated – specifically , which reads the file. Logging out and back in would apply the changes – and in fact you must do this if you want all your processes to receive the new environment. All other "solutions"2 will only apply the environment to the single shell process, but not to anything you launch through the GUI including new terminal…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix