Basically (and very roughly), the standard paths on Unix are:
/bin
&/sbin
for vital programs for the OS, sbin being for administrators only ;/usr/bin
&/usr/sbin
for not vital programs, sbin being for administrators only ;/var
for living data for programs. It can be cache data, spool data, temporary data (unless it's in/tmp
, which is wiped at every reboot), etc. ;/usr/local
for locally installed programs. Typically, it hosts programs that follow the standards but were not packaged for the OS, but rather installed manually by the administrator (using for example./configure && make && make install
) as well as administrator scripts ;/opt
for programs that are not packaged and don't follow the standards. You'd just put all the libraries there together with the program. It's often a quick & dirty solution, but it can also be used for programs that are made by yourself and for which you wish to have a specific pa