255 lines
5.0 KiB
Plaintext
255 lines
5.0 KiB
Plaintext
The following is being submitted by Alan Clegg [abc@concert.net] on behalf of
|
|
the linux-standards group as the recommended standard for directory file
|
|
structure under Linux.
|
|
|
|
Complete implementation of this file structure is completely voluntary,
|
|
and will not be enforced, but will be recommended. This specification
|
|
is released as guidelines for people porting and writing software for
|
|
the Linux Operating System to allow easy software installation, upgrade, and
|
|
tailoring on already installed systems.
|
|
|
|
Root Directory:
|
|
|
|
Files:
|
|
{none defined by spec}
|
|
|
|
Directories:
|
|
bin dev etc home lib mnt usr
|
|
|
|
Rationale:
|
|
The root directory should not be cluttered with files or
|
|
directories, and should contain no user programs.
|
|
|
|
/bin Directory:
|
|
|
|
Files:
|
|
sh init mount umount dd cat ls fsck mkfs {and as needed}
|
|
|
|
Directories:
|
|
{none defined by spec}
|
|
|
|
Rationale:
|
|
The /bin directory should contain programs that are vital
|
|
to the restoration of other file systems in the case of
|
|
a corrupting crash. No executable in /bin should require
|
|
any other file system to be mounted to execute correctly.
|
|
|
|
/dev Directory:
|
|
|
|
Files:
|
|
{device files}
|
|
|
|
Directories:
|
|
{none define by spec}
|
|
|
|
Rationale:
|
|
Standard UNIX device files. This directory should contain
|
|
device entries for all devices that are supported in the
|
|
standard kernel, even if the hardware device does not exist
|
|
on the system. Note that the distribution will have all
|
|
device files, but they may be removed by the user upon
|
|
system installation.
|
|
|
|
|
|
/etc Directory:
|
|
|
|
Files:
|
|
mtab passwd rc ttytab {and as needed}
|
|
|
|
Directories:
|
|
{none defined by spec}
|
|
|
|
Rationale:
|
|
Standard location of files required during system boot. Files
|
|
in this directory are usually system specific. Most will
|
|
require human intervention during system upgrade.
|
|
|
|
/home Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
Directories:
|
|
{one per user excepting root}
|
|
|
|
Rationale:
|
|
Standard location of users home directories. Will most likely
|
|
be a mounted file system once the system is up. root's home
|
|
directory should be /.
|
|
|
|
/lib Directory:
|
|
|
|
Files:
|
|
{libraries required for system initialization}
|
|
|
|
Directories:
|
|
{none defined by spec}
|
|
|
|
Rationale:
|
|
To keep the size of the root partition small (if separate from
|
|
/usr), the files in this directory should only be ones required
|
|
by files in the root partition.
|
|
|
|
/mnt Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
Directories:
|
|
NONE
|
|
|
|
Rationale:
|
|
Standard mount point for external (transient) file systems.
|
|
Must be available for sub-system installation. Should remain
|
|
as an empty directory.
|
|
|
|
/tmp Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
Directories:
|
|
NONE
|
|
|
|
Rationale:
|
|
Temporary file space available for general program use. May
|
|
become a mounted partition upon system boot.
|
|
|
|
/usr Directory:
|
|
|
|
Files:
|
|
{none defined by spec}
|
|
|
|
Directories:
|
|
adm bin spool local lib etc man include src tmp
|
|
|
|
Rationale:
|
|
/usr is the mount point for the second major (after root)
|
|
hierarchy of file structure and is discussed in the next
|
|
section.
|
|
|
|
/usr/adm Directory:
|
|
|
|
Files:
|
|
{none defined in spec}
|
|
|
|
Directories:
|
|
{none defined in spec}
|
|
|
|
Rationale:
|
|
Location of log files and accounting information.
|
|
|
|
/usr/bin Directory:
|
|
|
|
Files:
|
|
{all executable files from standard distribution not contined
|
|
in /bin}
|
|
|
|
Directories:
|
|
{none defined in spec}
|
|
|
|
Rationale:
|
|
contains 'drop-in' executables that are considered to be
|
|
standard to the UNIX system. These files should NOT be
|
|
Linux specific, but should have the same function as their
|
|
UNIX equivalents.
|
|
|
|
/usr/etc Directory:
|
|
|
|
Files:
|
|
{none defined in spec}
|
|
|
|
Directories:
|
|
{none defined in spec}
|
|
|
|
Rationale:
|
|
contains configuration files for any files in /usr/bin. helps
|
|
to keep /etc clean and small.
|
|
|
|
/usr/spool Directory:
|
|
|
|
Files:
|
|
{none defined in spec}
|
|
|
|
Directories:
|
|
uucp mail
|
|
|
|
Rationale:
|
|
containes spool files for mail, printing, uucp transfer, etc.
|
|
May be a mount point for another volume.
|
|
|
|
/usr/local Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
Directories:
|
|
bin lib etc man src
|
|
|
|
Rationale:
|
|
contains files local to the specific system. will not be
|
|
modified by upgrade process.
|
|
|
|
/usr/lib Directory:
|
|
|
|
Files:
|
|
libc.a crt0.s {and as needed}
|
|
|
|
Directories:
|
|
{none defined in spec}
|
|
|
|
Rationale:
|
|
location for library files required for multi-user system
|
|
operation. This is the directory where program libraries
|
|
should reside.
|
|
|
|
/usr/man Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
Directories:
|
|
man1 man2 man3 man4 man5 man6 man7 man8
|
|
cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8
|
|
|
|
Rationale:
|
|
Contains manual pages for programs that are standard with
|
|
Linux.
|
|
|
|
/usr/include Directory:
|
|
|
|
Files:
|
|
{programmers include files}
|
|
|
|
Directories:
|
|
{as needed}
|
|
|
|
Rationale:
|
|
Standard place for system include files.
|
|
|
|
/usr/src Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
Directories:
|
|
bin lib linux usr.bin usr.lib
|
|
|
|
Rationale:
|
|
Contains source code for all applications in the release.
|
|
/usr/src/linux contains directories required for kernel builds.
|
|
|
|
/usr/tmp Directory:
|
|
|
|
Files:
|
|
NONE
|
|
|
|
|
|
Directories:
|
|
NONE
|
|
|
|
Rationale:
|
|
Used as additional scratch space for programs. If /tmp is
|
|
a mounted file system, /usr/tmp may be a symbolic link to
|
|
/tmp.
|