Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

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

This question already has an answer here:

I'm trying to understand Linux file system, and one of the question is:

1- Why there are multiple folders for executable files: /usr/bin, /usr/sbin/ and /usr/local/bin? Is there any differences between them ?

2- If I have an executable file and I want to add it to my system, which of the third latter locations is the best for me ?

share|improve this question

marked as duplicate by Gilles linux Jun 18 '14 at 23:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Search this site for FHS, you'll find a lot of info is already here + the Wikipedia article. Mull that over and see they cover your Q. – slm Jun 18 '14 at 19:24
up vote 6 down vote accepted
  1. Run man hier from the command line to get the answer to your first question.
  2. It depends. See /usr/bin vs /usr/local/bin on Linux
share|improve this answer
Hehe, "man hier" reads in German somewhat like "man, [look] here!" Which sounds like an unfriendly call or hint to look at something obvious. :) – try-catch-finally Jun 18 '14 at 20:22
Heh, yes. hier stands for "hierarchy" in this case. – denten Jun 18 '14 at 20:28

It's called the Filesystem Hierarchy Standard and the gory details can be found here


/usr/bin is for user programs.

/usr/sbin is for system programs - those that are used by admins, but not general users.

Both the above begin with /usr and the standard states that these could be hosted on a shared server (using NFS, for example) and accessed by the various hosts on a network. The variants without the /usr (that is /bin and /sbin) are for essential programs that the system needs to boot (as the files in /usr tree won't be available if they're on a NFS share).

/local/bin are for locally compiled user programs.

If you have an executable, which wasn't installed using the system's package manager, then I suppose you should place it in /usr/local/bin if it's to be used by many users, or you could leave it in your home directory if it's only going to be used by yourself.

share|improve this answer

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