Filesystem Hierarchy Standard The FHS standard defines four hierarchies of directories used in organizing the files of the filesystem. The top-level or root hierarchy follows: Directory Contents / The base of the structure, or root of the filesystem, this directory unifies all directories regardless of whether they are local partitions, removable devices or network shares /bin Essential binaries like the ls, cp, and rm commands, and be a part of the root filesystem /boot Files necessary to boot the system, such as the Linux kernel and associated configuration files /dev Files that represent hardware devices and other special files, such as the /dev/null and /dev/zero files /etc Essential host configurations files such as the /etc/hosts or /etc/passwd files /home User home directories /lib Essential libraries to support the executable files in the /bin and /sbin directories /lib64 Essential libraries built for a specific architecture. For example, the /lib64 directory for 64-bit AMD/Intel x86 compatible processors /media Mount point for removable media mounted automatically /mnt Mount point for temporarily mounting filesystems manually /opt Optional third-party software installation location /proc Virtual filesystem for the kernel to report process information, as well as other information /root Home directory of the root user /sbin Essential system binaries primarily used by the root user /sys Virtual filesystem for information about hardware devices connected to the system /srv Location where site-specific services may be hosted /tmp Directory where all users are allowed to create temporary files and that is supposed to be cleared at boot time (but often is not) Directory Contents /usr Second hierarchy Non-essential files for multi-user use /usr/local Third hierarchy Files for software not originating from distribution /var Fourth hierarchy Files that change over time /var/cache Files used for caching application data /var/log Most log files /var/lock Lock files for shared resources /var/spool Spool files for printing and mail /var/tmp Temporary files to be preserved between reboots The second and third hierarchies, located under the /usr and /usr/local directories, repeat the pattern of many of the key directories found under the first hierarchy or root filesystem. The fourth hierarchy, the /var directory, also repeats some of the toplevel directories such as lib, opt and tmp. While the root filesystem and its contents are considered essential or necessary to boot the system, the /var, /usr and /usr/local directories are deemed non-essential for the boot process. As a result, the root filesystem and its directories may be the only ones available in certain situations like booting into single-user mode, an environment designed for troubleshooting the system. The /usr directory is intended to hold software for use by multiple users. The /usr directory is sometimes shared over the network and mounted as read-only. The /usr/local hierarchy is for installation of software that does not originate with the distribution. Often this directory is used for software that is compiled from the source code.