Skip to content

Instantly share code, notes, and snippets.

@tariqmislam
Created March 22, 2012 15:55
Show Gist options
  • Save tariqmislam/2159161 to your computer and use it in GitHub Desktop.
Save tariqmislam/2159161 to your computer and use it in GitHub Desktop.
Setting Global Environment Variables on Ubuntu
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