What is the difference between /usr/bin
and /usr/local/bin
?
Why are there both directories and why do some executable programs exist in both directories?
What is the difference between /usr/bin
and /usr/local/bin
?
Why are there both directories and why do some executable programs exist in both directories?
/usr/bin
: contains executable programs that are part of the operating system and installed by its package manager
/usr/local/bin
: default location for executable programs not part of the operating system and installed there by the local administrator, usually after building them from source with the sequence configure;make;make install
. The goal is not to break the system by overwriting a functional program by a dysfunctional or one with a different behavior.
When the same program exists in both directories, you can select which ones will be called by default by rearranging the order of the directories in your PATH
.
/usr/bin
also was a path for executables that are not part of the OS. This was in the 1970s and maybe it helps to understand that using /usr/local/bin
is repeating the mistakes from the 1970s.
– schily
Feb 02 '16 at 14:15
/usr/bin is general system-wide binaries that contains most of the executable files (i.e., ready-to-run programs) that are not needed for booting (i.e., starting) or repairing the system.
/usr/local/bin is for programs that a normal user may run.
/usr/bin
is also for programs that a normal user may run. By the way, "not normal" users might equally run whatever they choose to.
– jlliagre
Feb 03 '16 at 12:51