/sbin) were intended for programs that needed to be on a small
/partition before the larger
/usr, etc. partitions were mounted. These days, it mostly serves as a standard location for key programs like
/bin/sh, although the original intent may still be relevant for e.g. installations on small embedded devices.
/sbin, as distinct from
/bin, is for system management programs (not normally used by ordinary users) needed before
/usr/binis for distribution-managed normal user programs.
There is a
/usr/sbinwith the same relationship to
/usr/local/binis for normal user programs not managed by the distribution package manager, e.g. locally compiled packages. You should not install them into
/usr/binbecause future distribution upgrades may modify or delete them without warning.
/usr/local/sbin, as you can probably guess at this point, is to
In addition, there is also
/opt which is for monolithic non-distribution packages, although before they were properly integrated various distributions put Gnome and KDE there. Generally you should reserve it for large, poorly behaved third party packages such as Oracle.
I recommend taking a look at the file system hierarchy man page:
which is also available online, for instance: http://linux.die.net/man/7/hier.
Relevant portions have been copied below.
Depending on your system, it may say something different.
hier – description of the file system hierarchy
A typical Linux system has, among others, the following directories:
This directory contains executable programs which are needed
in single user mode and to bring the system up or repair it.
/bin, this directory holds commands needed to boot the system,
but which are usually not executed by normal users.
This is the primary directory for executable programs.
Most programs executed by
normal users which are not needed for booting or for repairing the system and
which are not installed locally
should be placed in this directory.
Binaries for programs local to the site.
Locally installed programs for system administration.
This directory contains program binaries for system administration
which are not essential for the boot process, for mounting
or for system repair.
The Filesystem Hierarchy Standard entry in Wikipedia helped me answer the same question when I had it, plus it has a very explanatory table.
Excerpt from that page1:
/bin Essential command binaries that need to be available in single user mode; for all users, e.g., cat, ls, cp. /usr/bin Non-essential command binaries (not needed in single user mode); for all users. /usr/local Tertiary hierarchy for local data, specific to this host. Typically has further subdirectories, e.g., bin, lib, share /usr/sbin Non-essential system binaries, e.g., daemons for various network-services. /sbin Essential system binaries, e.g., fsck, init, route.
1 Retrieved on June 19, 2019; permalink.