3

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.

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

3 Answers 3

5

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
0
1

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

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

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.

PATH DEFAULT=${PATH}:~/MyPrograms

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .