8

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 Answers1

14

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.

enzotib
  • 93,831