Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 5 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.

share|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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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