LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   changing PATH (https://www.linuxquestions.org/questions/linux-newbie-8/changing-path-6926/)

toxic53 09-26-2001 08:24 PM

changing PATH
 
what file do you edit or how do you change the PATH to be permanent until you want to change it again... I changed it with a simple

PATH=(SPECIFIED PATH)

it works fine while i'm logged in but once I relogin in.. i have to change the PATH again

any suggestions thanks:confused:

DMR 09-27-2001 12:04 AM

It depends on the shell you're using, but if you use bash:

To modify the global PATH variable, look in the /etc/profile or /etc/bashrc file for a line beginning with "PATH=". The paths listed there are separated by a colon; append your desired path to that line, making sure it is preceded by a colon. An "export" line needs to exist somewhere after the PATH line, and it should include the word PATH.

To set a path for individual users, the file to modify will be either /home/username/.bashrc or /home/username/.bash_profile.

The content and layout of these files differs between distros, but they are similar enough that you should be able to sort it out.

Also- although it hasn't been updated in a while, you might want to read the Path Mini HOW-TO.


All times are GMT -5. The time now is 11:35 PM.