Just as the title indicates my PATH variable resets after every reboot. I read that I have to edit my bashrc file's PATH variable, but I don't have anything there that suggests anything related to the PATH variable.

  • Are you manually setting it to anything each time? What does it reset to? – Chris Wayne Jul 16 '12 at 14:25
  • It just resets to its default PATH. – Shelby. S Jul 16 '12 at 14:38

if you want to update the PATH only for your user, just edit your local bashrc

gedit ~/.bashrc

if you want to update the global PATH

gksudo gedit /etc/bash.bashrc

If it isn't in your ~/.bashrc add it on a new line.

export PATH=/path/to/whatever:$PATH

Environment variable settings that should affect just a particular user (rather than the system as a whole) should be set into:

~/.pam_environment # This file is specifically meant for setting a user's environment. 

It is not a script file, but rather consists of assignment expressions, one per line.


Note: Using .pam_environment requires a re-login in order to initialize the variables. Restarting just the terminal is not sufficient to be able to use the variables.

source: https://help.ubuntu.com/community/EnvironmentVariables#Session-wide_environment_variables

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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