Contents
Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard (FHS) is a reference describing the conventions used for the layout of Unix-like systems. It has been made popular by its use in Linux distributions, but it is used by other Unix-like systems as well. It is maintained by the Linux Foundation. The latest version is 3.0, released on 3 June 2015.
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. Some of these directories only exist in a particular system if certain subsystems, such as the X Window System, are installed. Most of these directories exist in all Unix-like 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.
FHS compliance
Most Linux distributions follow the Filesystem Hierarchy Standard and declare it their own policy to maintain FHS compliance. GoboLinux and NixOS provide examples of intentionally non-compliant filesystem implementations. Some distributions generally follow the standard but deviate from it in some areas. The FHS is a "trailing standard", and so documents common practices at a point in time. Of course, times change, and distribution goals and needs call for experimentation. Some common deviations include: Modern Linux distributions include a directory as a temporary filesystem (tmpfs), which stores volatile runtime data, following the FHS version 3.0. According to the FHS version 2.3, such data were stored in, but this was a problem in some cases because this directory is not always available at early boot. As a result, these programs have had to resort to trickery, such as using, , or directories, even though the device directory is not intended for such data. Among other advantages, this makes the system easier to use normally with the root filesystem mounted read-only. For example, below are the changes Debian made in its 2013 Wheezy release:
History
The name of
originally stood for "user". This was an artifact of early Unix programming. Specifically, when Ken Thompson and Dennis Ritchie were migrating Unix to a PDP-11, the ... directories, which were to be the first directories to be mounted on startup, and must contain all essentials for the OS to function, became bigger than the RK05 disk drive. So they put some of those in the first RK05, including those that are required for loading the second RK05 drive. The rest were put into the directory. When they got a third drive, users' files were moved to a new directory named. FHS was created as the FSSTND (short for "Filesystem Standard" ), largely based on similar standards for other Unix-like operating systems. 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(7).
Release history
This article is derived from Wikipedia and licensed under CC BY-SA 4.0. View the original article.
Wikipedia® is a registered trademark of the
Wikimedia Foundation, Inc.
Bliptext is not
affiliated with or endorsed by Wikipedia or the
Wikimedia Foundation.