LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to edit default PATH? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-edit-default-path-159644/)

davidas 03-18-2004 09:45 PM

How to edit default PATH?
 
[root@branch etc]# echo $PATH
[root@branch etc]# /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

I could not find this path string in either /etc/profile, /etc/bash_profile, ~/.bash_profile, or ~/bashrc. What is the file that contains the above PATH string from which I can edit?

Thanks.
Using Fedora distro.

mikshaw 03-18-2004 10:33 PM

It's probably in a system-wide startup script...maybe in multiple scripts. You don't need to edit that script to modify your path...just add PATH=$PATH:/new/path:/another/new/path to one of the files you mentioned and your new paths will be appended.
Personally I put everything in ~/.bashrc and source that from ~/.bash_profile, and I haven't had any trouble yet.

jschiwal 03-20-2004 05:34 AM

Adding to the PATH variable should be done in ~/.bash_profile. This will run when you log in. You don't want it to run everytime that you open up a new shell, which ~/.bashrc would do.


All times are GMT -5. The time now is 08:52 AM.