286 lines
5.9 KiB
HTML
286 lines
5.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>/lib</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Filesystem Hierarchy"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Linux Filesystem Hierarchy"
|
|
HREF="c23.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="/initrd"
|
|
HREF="initrd.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="/lost+found"
|
|
HREF="lostfound.html"></HEAD
|
|
><BODY
|
|
CLASS="sect1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
SUMMARY="Header navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Filesystem Hierarchy: </TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="initrd.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 1. Linux Filesystem Hierarchy</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="lostfound.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="sect1"
|
|
><H1
|
|
CLASS="sect1"
|
|
><A
|
|
NAME="lib"
|
|
></A
|
|
>1.9. /lib</H1
|
|
><P
|
|
> The /lib directory contains kernel modules and those shared library images (the C programming code library) needed to boot the system and run the commands in the root filesystem, ie. by binaries in /bin and /sbin. Libraries are readily identifiable through their filename extension of *.so. Windows equivalent to a shared library would be a DLL (dynamically linked library) file. They are essential for basic system functionality. Kernel modules (drivers) are in the subdirectory /lib/modules/'kernel-version'. To ensure proper module compilation you should ensure that /lib/modules/'kernel-version'/kernel/build points to /usr/src/'kernel-version' or ensure that the Makefile knows where the kernel source itself are located.
|
|
</P
|
|
><P
|
|
> <P
|
|
></P
|
|
><DIV
|
|
CLASS="variablelist"
|
|
><DL
|
|
><DT
|
|
>/lib/'machine-architecture'</DT
|
|
><DD
|
|
><P
|
|
>Contains platform/architecture dependent libraries.</P
|
|
></DD
|
|
><DT
|
|
>/lib/iptables</DT
|
|
><DD
|
|
><P
|
|
>iptables shared library files.</P
|
|
></DD
|
|
><DT
|
|
>/lib/kbd</DT
|
|
><DD
|
|
><P
|
|
>Contains various keymaps.</P
|
|
></DD
|
|
><DT
|
|
>/lib/modules/'kernel-version'</DT
|
|
><DD
|
|
><P
|
|
>The home of all the kernel modules. The organisation of
|
|
files here is reasonably clear so no requires no elaboration.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>/lib/modules/'kernel-version'/isapnpmap.dep</DT
|
|
><DD
|
|
><P
|
|
> has details on ISA based cards, the modules that they
|
|
require and various other attributes.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>/lib/modules/'kernel-version'/modules.dep</DT
|
|
><DD
|
|
><P
|
|
> lists all modules dependencies. This file can
|
|
be updated using the depmod command.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>/lib/modules/'kernel-version'/pcimap</DT
|
|
><DD
|
|
><P
|
|
>is the PCI equivalent of the
|
|
/lib/modules/'kernel-version'/isapnpmap.dep file.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>/lib/modules/'kernel-version'/usbmap</DT
|
|
><DD
|
|
><P
|
|
>is the USB equivalent of the
|
|
/lib/modules/'kernel-version'/isapnpmap.dep file.</P
|
|
></DD
|
|
><DT
|
|
>/lib/oss</DT
|
|
><DD
|
|
><P
|
|
> All OSS (Open Sound System) files are installed
|
|
here by default.
|
|
</P
|
|
></DD
|
|
><DT
|
|
>/lib/security</DT
|
|
><DD
|
|
><P
|
|
>PAM library files.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
>
|
|
</P
|
|
><P
|
|
> <TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><FONT
|
|
COLOR="#000000"
|
|
><PRE
|
|
CLASS="screen"
|
|
> The FSSTND states that 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.
|
|
|
|
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.
|
|
|
|
At least one of each of the following filename patterns are required (they
|
|
may be files, or symbolic links):
|
|
|
|
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. The usual placement of this binary is /usr/bin/cpp.
|
|
|
|
The following directories, or symbolic links to directories, must be in
|
|
/lib, if the corresponding subsystem is installed:
|
|
|
|
modules Loadable kernel modules (optional)
|
|
|
|
/lib<qual> : Alternate format essential shared libraries (optional)
|
|
|
|
There may be one or more variants of the /lib directory on systems which
|
|
support more than one binary format requiring separate libraries.
|
|
|
|
This is commonly used for 64-bit or 32-bit support on systems which support
|
|
multiple binary formats, but require libraries of the same name. In this
|
|
case, /lib32 and /lib64 might be the library directories, and /lib a symlink
|
|
to one of them.
|
|
|
|
If one or more of these directories exist, the requirements for their contents
|
|
are the same as the normal /lib directory, except that /lib<qual>/cpp is
|
|
not required.
|
|
|
|
/lib<qual>/cpp is still permitted: this allows the case where /lib and
|
|
/lib<qual> are the same (one is a symbolic link to the other).
|
|
</PRE
|
|
></FONT
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
>
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
SUMMARY="Footer navigation table"
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="initrd.html"
|
|
ACCESSKEY="P"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
ACCESSKEY="H"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="lostfound.html"
|
|
ACCESSKEY="N"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>/initrd</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="c23.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>/lost+found</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |