Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 9 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

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


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.