The /lib
directory contains those shared
library images needed to boot the system and run the commands in the
root filesystem, ie. by binaries in /bin
and
/sbin
.
[11]
At least one of each of the following filename patterns are required (they may be files, or symbolic links):
File | Description |
---|---|
libc.so.* | The dynamically-linked C library (optional) |
ld* | The execution time linker/loader (optional) |
If a C preprocessor is installed, /lib/cpp must be a reference to it, for historical reasons. [12]
The following directories, or symbolic links to directories,
must be in /lib
, if the corresponding subsystem
is installed:
Directory | Description |
---|---|
modules | Loadable kernel modules (optional) |
[11]
Shared libraries that are only necessary for binaries in
/usr
(such as any X Window binaries) must not be
in /lib
. Only the shared libraries required to
run binaries in /bin
and
/sbin
may be here. In particular, the library
libm.so.*
may also be placed in
/usr/lib
if it is not required by anything in
/bin
or /sbin
.
[12]
The usual placement of this binary is /usr/bin/cpp
.