Filesystem Hierarchy Standard

3.9 /lib : Essential shared libraries and kernel modules

3.9.1 Purpose

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.[footnote 10]

3.9.2 Requirements

At least one of each of the following filename patterns are required (they may be files, or symbolic links):* 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.[footnote 11]

3.9.3 Specific Options

The following directories, or symbolic links to directories, must be in /lib, if the corresponding subsystem is installed:

"essential shared libraries and kernel modules"
Loadable kernel modules (optional)


[10] 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* may also be placed in /usr/lib if it is not required by anything in /bin or /sbin.

[11] The usual placement of this binary is /usr/lib/gcc-lib/<target>/<version>/cpp. /lib/cpp can either point at this binary, or at any other reference to this binary which exists in the filesystem. (For example, /usr/bin/cpp is also often used.)

Previous: /home : User home directories (optional)
Next: /lib<qual> : Alternate format essential shared libraries (optional)
Up: Table of Contents

Translated by troff2html v1.5 on 29 March 2002 by Daniel Quinlan