Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have not added ~/bin to any of my .bash* files. However, $PATH does list that directory.

The reason I am asking this in the Ubuntu specific StackExchange is because, well, I have exactly the same .bashrc, .bash_profile and .bash_aliases in both Fedora and Ubuntu machines (in fact, I have them on Dropbox and symlinked in ~) and in my Fedora machines, ~/bin is not added.

In other words, if I add ~/bin to my path by making an entry in .bashrc, it shows up once on Fedora and twice on Ubuntu.

Where is ~/bin being added to my path?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

In your ~/.profile you find these lines:

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

It is here that, if exists as a directory, ~/bin is added to your PATH.

share|improve this answer
    
Thank you! I didn't know Ubuntu creates a ~/.profile , I was just looking for a ~/.bash_profile and didn't find one ! –  Hari Sundararajan Jun 22 '11 at 21:34

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.