I would like to know from where is the PATH value in the env of my terminal (Fedora machine) gets populated?

link|improve this question

57% accept rate
feedback

2 Answers

up vote 4 down vote accepted

It starts in /etc/profile. From there, scripts in /etc/profile.d can modify it. Then it goes to ~/.profile, ~/.bash_profile, and ~/.bashrc.

link|improve this answer
my PATH is missing /sbin? how can i add that to my default PATH? – Sen Jan 4 '11 at 14:27
2  
@Sen: by default /sbin isn't on the path of normal users. The stuff in /sbin is meant for the use of root and superusers only. The typical way to gain access to /sbin stuff is to switch to a superuser account. Either su - to root or use sudo to access the stuff like so sudo /sbin/service. – Ian C. Jan 4 '11 at 14:53
Minor comment for readers: this is the same sequence as in all systems that use bash, not just fedora. – Rich Homolka Jan 4 '11 at 17:01
feedback

I don't have my Linux machine at the moment, but isn't that stored in the .bashrc of your home folder?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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