In the root directory, we can find several 'lib' subfolder, for example, /lib
, lib32
, lib64
, /usr/lib
, /usr/lib32
, /usr/local/lib
.
What are their differences?
/lib
contain "essential" libraries that may be needed even in single-user (admin-only) mode and without /usr
mounted
/usr/lib
are the libraries for the normal user-programs, that mostly can be found under /usr
.
/usr/local/lib
are the libraries for locally installed programs and packages ie. things you've compiled and installed from source-packages yourself.
In addition to shared and static libraries which are the lib-directories main purpose, you may also find some hierarchies (with their own lib, bin, include and so on) for some larger packages under them.
lib32
and lib64
are used on 64-bits systems to separate libraries for 32-and 64-bits.
lib
directories, and I think it's useful on its own. Also this question isn't specific to 12.04, there might be a better tag for this. – jrh Nov 15 '18 at 18:26