Created
March 22, 2012 15:55
-
-
Save tariqmislam/2159161 to your computer and use it in GitHub Desktop.
Setting Global Environment Variables on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I ran into a situation where I needed to execute something as root, but the executable file needed access to environment variables that I had defined in my .bashrc file. | |
To fix this, I added those same environment variable definitions from the .bashrc file to my /etc/environment file. Note that you need to remove the 'export' statement at the beginning of each variable you define in /etc/environment. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment