Linux directory structure, the Filesystem Hierarchy Standard of Linux, 2013-08-01 Wikipedia


 * Copied from en.wikipedia.org in compliance with the rules of the Creative Commons Attribution-ShareAlike License (CC BY-SA)
 * Current article on Wikipedia http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard


 * Gekopieerd van en.wikipedia.org in overeenstemming met de spelregels van de licentie Creative Commons Attribution-ShareAlike (CC 'BY-SA').
 * Het artikel zoals het nu op Wikipedia is http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix and Unix-like operating systems. For the most part, it is a formalization and extension of the traditional BSD filesystem hierarchy.

The FHS is maintained by the Linux Foundation. The current version is 2.3, announced on 29 January 2004.

FHS compliance
Most Linux distributions follow the FHS and declare it their own policy to maintain FHS compliance.

Some distributions which generally follow the standard deviate from it in some areas. Common deviations include:
 * Modern Linux distributions include a  directory as a virtual filesystem (sysfs, comparable to , which is a procfs), which stores and allows modification of the devices connected to the system, whereas many traditional UNIX and Unix-like operating systems use   as a symbolic link to the kernel source tree.
 * Modern Linux distributions include a  directory as a temporary filesystem (tmpfs) which stores volatile runtime data, and which is being considered for the next version of the FHS. According to the FHS version 2.3, this data should be stored in   but this was a problem in some cases because this directory isn't always available at early boot. As a result, these programs have had to resort to such trickery as using ,  ,   or   directories, even though the device directory isn't intended for such data. Among other advantages, this makes the system easier to use normally with the root filesystem mounted read-only.
 * This is a detailed example from Debian:
 * (writeable files) →
 * (writeable files) →
 * (writeable files) →
 * (writeable files) →


 * Some Linux distributions no longer differentiate between  versus   and have   symlinked to.
 * Some Linux distributions no longer differentiate between  versus   and   versus  . They symlink   to   and   to  . And   may get symlinked to.

History
When the FHS was created, other UNIX and Unix-like operating systems already had their own standards. Notable examples are these: the hier(7) description of file system layout, which has existed since the release of Version 7 Unix (in 1979); the SunOS filesystem(7) and its successor, the Solaris filesystem(5).

Directory structure
In the FHS all files and directories appear under the root directory "/", even if they are stored on different physical or virtual devices. Note however that some of these directories may or may not be present on a Unix system depending on whether certain subsystems, such as the X Window System, are installed.

The majority of these directories exist in all UNIX operating systems and are generally used in much the same way; however, the descriptions here are those used specifically for the FHS, and are not considered authoritative for platforms other than Linux.