Where Binary Files are stored
Executable files live in directories hanging ultimately from /. More specifically, programs are distributed across a three-tier structure: the first tier / includes programs that can be necessary in single-user mode, the second tier /user contains most multi-super programs and the third tier /usr/local is used to store software that is not provided by the distribution and has been compiled locally.
/sbin It contains essential binaries for system administration such as parted
or ip
.
/bin It contains essential binaries for all users such as ls
, mv
, or mkdir
/usr/sbin It stores binaries for system administration such as deluser
, or groupadd
.
/usr/bin It includes most executable files - such as free
, pstree
, sudo
or man
- that can be used by all users.
/usr/local/sbin It is used to store locally installed programs for system administration that are not managed by the system's package manager.
/usr/local/sbin It serves the same purpose as /usr/local/sbin
but for regular user programs.
Recently some distributions started to replace /bin
and /sbin
with symbolic links to /usr/bin
and /usr/sbin
.