The Root Filesystem

A guiding principle behind the structure of the root directory is that:

The contents of the root filesystem should be adequate to boot, restore, recover, and/or repair the system.

A primary goal of the FHS is to ensure that the root filesystem is kept as small as possible. This is important because:

Software should never create or require special files or subdirectories in the root directory.

The root directory consists of:

A brief introduction to the subdirectories.

/bin
/bin contains the commands used by both users and the sysop, but which are going to be needed for the system to boot, or in single user mode.
e.g. cat, chmod, ls, date, pwd, sed, sh, uname.
/boot
/boot contains the files necessary for the boot process. Note that you can make /boot a seperate partition and therefore avoid the 1024 cylinder restriction of lilo.
/dev
/dev is the the location of special or device files. It should also contain MAKEDEV, which can create device files as needed.
/etc
/etc contains the configuration files and directories specific to the current system. It should contain no binaries, binaries which would have used to go here should now go in /sbin, /usr/sbin, or /usr/libexec. There will also be /etc/X11, or /etc/opt if X11 or /opt is installed.
/home
This is the recommended location for users home directories. The FHS however considers this optional, and any structure under it is undefined.
/lib
/lib contains the shared libraries necessary to boot the system and run the commands in the root filesystem (normally /bin and /sbin).
/mnt
Temporarily mounted filesystems should be mounted under /mnt.
/opt
/opt is for additional software packages. It is very similar to /usr/local. The difference being /opt should be shareable, while /usr/local may not me. Each package should be installed in /opt/<package>. /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man are left undefined, they are reserved for the local sysop's use (ie you).
/proc
If you don't know what /proc is, ask someone later.
/root
Often used as the home directory for root. The standard considers this optional, however it is recommended, especially if you are mounting /home from another partition.
/sbin
/sbin stands for System BINaries. It should contain the binaries essential for booting the system. When deciding where to put a binary (or find it), ask yourself this.
/tmp
Temporary data area. Normally deleted with every reboot. (but this is site specific).

The other two directories, /usr and /var will be dealt with individually.

<<< Contents >>>


Andrae Muys
Version: $Id: root.html,v 2.2 2000/01/06 13:21:13 clinton Exp $