The root directory contains the entire system hierarchy. It cannot be classified since its sub-directories may or may not be static or shareable. Here is a list of the main directories and sub-directories, with their classifications:
/bin
:
essential binary files. It contains the basic commands which will be
used by all users and which are necessary for the operation of the
system: ls, cp,
login, etc. Static, unshareable.
/boot
: contains the files
required by the GNU/Linux bootloader (GRUB or
LILO for Intel,
yaboot for PPC, etc). It may or may
not contain the kernel, but if the kernel isn't located in
this directory then it must be in the root directory. Static,
unshareable.
/dev
: system
device files (dev
for
DEVices). Some files contained by
/dev
are mandatory, such as
/dev/null
, /dev/zero
, and
/dev/tty
. Static, unshareable.
/etc
:
contains all configuration files specific to the computer. This
directory cannot contain binary files. Static, unshareable.
/home
: where
all the personal directories of the system's users are located. This
directory may or may not be shared (some large networks make it
shareable via NFS). Your favorite application's (like e-mail
readers or browsers) configuration files are located in this directory
and start with a period (“.”). For instance, the
Mozilla configuration files lie in the
.mozilla
directory. Variable, shareable.
/lib
: it
contains libraries which are essential to the system; it also stores
kernel modules in the /lib/modules/KERNEL_VERSION
sub-directory. It contains all libraries required by the binaries in
the /bin
and /sbin
directories. The optional ld*
execution time
linker/loader as well as the dynamically-linked C library
libc.so
must also reside in this directory.
Static, unshareable.
/mnt
:
directory containing the mount points for temporarily-mounted file
systems such as /mnt/cdrom
,
/mnt/floppy
, etc. The /mnt
directory is also used to mount temporary directories (a USB
card will be mounted in /mnt/removable
, for
instance). Variable, unshareable.
/opt
: contains packages not
essential for system operation. It is reserved for add-on
packages; packages such as Adobe Acrobat Reader are often
installed into /opt. The FHS recommends
that static files (binaries, libraries, manual pages, etc.)
installed in the /opt
structure be placed
in /opt/package_name
and the specific
configuration files in /etc/opt
.
/sbin
:
contains system binaries essential for system start-up. Most of these
files can only be executed by root
. A normal user may run
them, but they might not do anything. Static, unshareable.
/tmp
: directory intended
to contain temporary files which certain programs may create.
Variable, unshareable.
/usr
:
explained in more detail in Section 3, “/usr: The Big One”. Static,
shareable.
/var
:
location for data which may be modified in real time by programs (such
as mail servers, audit programs, print servers, etc.). Variable. Its
various sub-directories may be shareable or unshareable.