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. |
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. |
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. |