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 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.