The /usr/lib directory contains code libraries, configuration and data files for individual programs, auxiliary programs that are only invoked by other programs, and other stuff like that. The contents are pretty varied. Some programs want to have their support files directly in /usr/lib , some use a subdirectory below that.
/usr/lib is used only by programs in /usr/bin
(programs in /bin shouldn't need /usr/lib , since /usr might not have been mounted). Programs in /usr/local/bin use /usr/local/lib , and programs that are installed in their own directory tree (like X in /usr/X386 ) use a place in that tree ( /usr/X386/lib ).
Of the files in /usr/lib , files named libsomething.a
are usually libraries of subroutines in some programming language. The most important ones are libc.a , the standard C library (the one that contains printf, strcpy; everything except math stuff), libm.a (the math stuff), and libg.a (a debugging version of libc.a ).
Note that on there are several versions of the C libraries, static, and two types of shared libraries. The libsomething.a files are the static versions, the shared images are in libsomething.so. version (usually installed in lib , see below) and the stub functions (needed for linking with the shared images) are in libsomething.sa .