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?

1 Answer 1


In your ~/.profile you find these lines:

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

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

  • Thank you! I didn't know Ubuntu creates a ~/.profile , I was just looking for a ~/.bash_profile and didn't find one ! Jun 22, 2011 at 21:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .