Corrected Figure 19-2


This is the corrected version of Figure 19-2 in Using and Administering Linux: Volume 1 – Zero to SysAdmin: Getting Started. I apologize for any inconvenience.

Figure 19-2 provides a list of the standard, well known, and defined top-level Linux directories and their purposes. These directories are listed in alphabetical order.

Directory Part of / Description
/ (root filesystem) Yes The root filesystem is the top-level directory of the filesystem. It must contain all of the files required to boot the Linux system before other filesystems are mounted. After the system is booted, all other filesystems are mounted on standard, well defined, mount points as subdirectories of the root filesystem.
/bin Yes The /bin directory contains user executable files.1
/boot No Contains the static bootloader and kernel executable and configuration files required to boot a Linux computer.
/dev Yes This directory contains the device files for every hardware device attached to the system. These are not device drivers, rather they are files that represent each device on the computer and facilitate access to those devices.
/etc Yes Contains a wide variety of system configuration files for the host computer.
/home No Home directory storage for user files. Each user has a subdirectory in /home.
/lib Yes Contains shared library files that are required to boot the system.
/media No A place to mount external removable media devices such as USB thumb drives that may be connected to the host.
/mnt No A temporary mountpoint for regular filesystems (as in not removable media) that can be used while the administrator is repairing or working on a filesystem.
/opt No Optional files such as vendor supplied application programs should be located here.
/proc Virtual Virtual filesystem used to expose access to internal kernel information and editable tuning parameters.
/root Yes This is not the root (/) filesystem. It is the home directory for the root user.
/sbin Yes System binary files. These are executables used for system administration.
/selinux Virtual This filesystem is only used when SELinux is enabled.
/sys Virtual This virtual filesystem contains information about the USB and PCI busses and the devices attached to each.
/tmp No Temporary directory. Used by the operating system and many programs to store temporary files. Users may also store files here temporarily. Note that files stored here may be deleted at any time without prior notice.
/usr No These are shareable, read only files including executable binaries and libraries, man[ual] files, and other types of documentation.
/usr/local No These are typically shell programs or compiled programs and their supporting configuration files that are written locally and used by the SysAdmin or other users of the host.
/var No Variable data files are stored here. This can include things like log files, MySQL and other database files, web server data files, email inboxes, and much more.

Figure 19-2: The top level of the Linux Filesystem Hierarchical Standard.

1Note that /bin and /sbin are now just links to /usr/bin and /usr/sbin, respectively. They are no longer generally split into “essential” and “non-essential” as they used to be.