A typical Linux system has, among others, the following directories:
This is the root directory. This is where the whole tree starts.
This directory contains executable programs which are needed in
single user mode and to bring the system up or repair it.
Contains static files for the boot loader. This directory only holds
the files which are needed during the boot process. The map installer
and configuration files should go to
Special or device files, which refer to physical devices. See
If both MS-DOS and Linux are run on one computer, this is a typical
place to mount a DOS file system.
Contains configuration files which are local to the machine. Some
larger software packages, like X11, can have their own subdirectories
Site-wide configuration files may be placed here or in
Nevertheless, programs should always look for these files in
and you may have links for these files to
When a new user account is created, files from this directory are
usually copied into the user's home directory.
Configuration files for the X11 window system.
On machines with home directories for users, these are usually beneath
this directory, directly or not. The structure of this directory
depends on local admininstration decisions.
This directory should hold those shared libraries that are necessary
to boot the system and to run the commands in the root filesystem.
is a mount point for temporarily mounted filesystems
This is a mount point for the
filesystem, which provides information about running processes and
the kernel. This pseudo-file system is described in more detail in
this directory holds commands needed to boot the system, but which are
usually not executed by normal users.
This directory contains temporary files which may be deleted with no
notice, such as by a regular job or at system boot up.
This directory is usually mounted from a seperate partition. It
should hold only sharable, read-only data, so that it can be mounted
by various machines running Linux.
The X-Window system, version 11 release 6.
Binaries which belong to the X-Windows system; often, there is a
symbolic link from the more traditional
Data files associated with the X-Windows system.
These contain miscellaneous files needed to run X; Often, there is a
symbolic link from
to this directory.
Contains include files needed for compiling programs using the X11
window system. Often, there is a symbolic link from
to this directory.
This is the primary directory for executable programs. Most programs
executed by normal users which are not needed for booting or for
repairing the system and which are not installed locally should be
placed in this directory.
is the traditional place to look for X11 executables; on Linux, it
usually is a symbolic link to
This directory holds files containing word lists for spell checkers.
You may find documentation about the installed software packages
in this directory.
Site-wide configuration files to be shared between several machines
may be stored in this directory. However, commands should always
reference those files using the
directory. Links from files in
should point to the appropriate files in
Include files for the C compiler.
Include files for the C compiler and the X-Windows system. This is
usually a symbolic link to
Include files which declare some assembler functions. This used to be a
symbolic link to
This contains information which may change from system release to
system release and used to be a symbolic link to
to get at operating system specific information.
(Note that one should have include files there that work correctly with
the current libc and in user space. However, Linux kernel source is not
designed to be used with user programs and does not know anything
about the libc you are using. It is very likely that things will break
if you let
point at a random kernel tree. Debian systems don't do this
and use headers from a known good kernel
version, provided in the libc*-dev package.)
Include files to use with the GNU C++ compiler.
Object libraries, including dynamic libraries, plus some executables
which usually are not invoked directly. More complicated programs may
have whole subdirectories there.
The usual place for data files associated with X programs, and
configuration files for the X system itself. On Linux, it usually is
a symbolic link to
contains executables and include files for the GNU C compiler,
Files for the GNU groff document formatting system.
This is where programs which are local to the site typically go.
Binaries for programs local to the site go there.
Configuration files associated with locally installed programs go there.
Files associated with locally installed programs go there.
Info pages associated with locally installed programs go there.
Manpages associated with locally installed programs go there.
Locally installed programs for system admininstration.
Source code for locally installed software.
Manpages traditionally go in there, into their subdirectories.
These directories contain manual pages for the specified locale
in source code form. Systems which use a unique language and code set
for all manual pages may omit the
This directory contains program binaries for system admininstration
which are not essential for the boot process, for mounting
or for system repair.
This directory contains subdirectories with specific application data, that
can be shared among different architectures of the same OS.
Often one finds stuff here that used to live in
Manpages go in there, into their subdirectories.
These directories contain manual pages which are in source code form.
Systems which use a unique language and code set for all manual pages
may omit the
Source files for different parts of the system, included with some packages
for reference purposes. Don't work here with your own projects, as files
below /usr should be read-only except when installing software.
This has always been the traditional place where kernel sources were
unpacked. This was important on systems that /usr/include/linux was a
symlink here. You should probably use another directory for building the
Obsolete. This should be a link
This link is present only for compatibility reasons and shouldn't be used.
This directory contains files which may change in size, such as spool
and log files.
This directory is superseded by
and should be a symbolic link to
This directory is used to save backup copies of important system files.
These directories contain preformatted manual pages according to their
Lock files are placed in this directory. The naming convention for
device lock files is
is the device's name in the filesystem.
The format used is that of HDU UUCP lock files, i.e. lock files
contain a PID as a 10-byte ASCII decimal number, followed by a newline
Miscelanous log files.
This is where
saves edit sessions so they can be restored later.
Run-time variable files, like files holding process identifiers (PIDs)
and logged user information
Files in this directory are usually cleared when the system boots.