8

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

echo $PATH gives

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

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?

muru
  • 207,228
JohnDoe
  • 193

2 Answers2

9

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

apacheuk
  • 948
7

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.

Aaron
  • 6,764