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

Where is the correct place to store user-local executable files?

echo $PATH gives


It doesn't include eg. $HOME/bin

Would $HOME/bin be advisable? Or $HOME/opt/bin ....

I guess I would have to add that to my .profile too?

share|improve this question
Do not change anything, just mkdir ~/bin, log out and log back in and it'll be there. – Sergey Sep 20 '12 at 21:07
up vote 5 down vote accepted

I think if you add a $HOME/bin directory it should be added to the path automatically, looking in my .profile would indicate this

Yes just checked and by creating a $HOME/bin directory the next time you log in its automatically added to the path.

Hope that helps

share|improve this answer
That was it, thank you! – JohnDoe Sep 21 '12 at 5:42
BTW if you jut created this folder you will need to source .profile file in order to make new adde binary to be availible using $PATH : # source ~/.profile – micrub Feb 12 '14 at 15:07

Based-on what you are describing, I'm thinking that you should install your executables to /usr/local/bin/.

Here is an answer to a similar question that backs-up this assessment: What is the best place to install user apps?

Otherwise, you certainly could create a ~/bin directory and add it to your path. IMO that is a viable solution if those apps will/should be used only by your user. But you will run into some security headaches if another user has a need for those apps later on.

share|improve this answer
I share my laptop, on which I am hacking, with my wife. she will probably never need on of my executables. Thank's for your security concerns though! – JohnDoe Sep 21 '12 at 5:44

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.