I wish to know if there's any standard or recommended place to store your own custom commands (should you prefer not to install them in /usr/local/bin)?

I'm referring to small gimmicks that I, personally, don't prefer installing in /usr/local/bin for reasons such as, if I have to reformat my whole system and need to backup stuff, I won't be able to easily distinguish my own custom-made commands from the ones installed with package managers, etc.

I guess it might be up to personal choice to create something like /usr/local/mybin or similar, but is there a beaten path here that I'm not aware of? Your personal preference is also welcome.


The historically 'standard' place for your own binaries and scripts to go that you don't want to (or can't) install in /usr/local/[s]bin is ~/bin (i.e., the folder bin in your home directory).

You may need to add that folder to your $PATH environment variable in .bashrc, .profile or .cshrc etc depending on your shell.

  • I see, thanks. The one caveat might be that the bin dir would be visible in the desktop environment, which I might not prefer. Would it be recommendable practice to isolate your own executables inside /usr/local/bin, e.g. /usr/local/bin/hced/bin (hced being my username)? – Henrik Mar 9 '11 at 2:37
  • @hced: How about ~/.bin? – grawity Mar 9 '11 at 10:54
  • @grawity: good point, I might use that. I like conventions so I was interested to know what people do in situations when they want their own bin directory. Somehow, I get the feeling ~/.bin isn't overly common, or? Just curious. – Henrik Mar 10 '11 at 2:11
  • @hced: I also get the feeling that most people don't bother hiding ~/bin the same way they don't bother with /bin. – grawity Mar 10 '11 at 12:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.