This is an old revision of the document!


About

The Filesystem Hierarchy Standard (FHS) defines the main directories and their contents in GNU/Linux and other Unix-like computer operating systems.

Overview

The process of developing a standard FileSystem hierarchy began in August 1993 with an effort to restructure the file and directory structure of GNU/Linux. The FSSTND (Filesystem Standard), a filesystem hierarchy standard specific to the GNU/Linux operating system, was released on February 14, 1994. Subsequent revisions were released on October 9, 1994 and March 28, 1995.

In early 1996, the goal of developing a more comprehensive version of FSSTND to address not only GNU/Linux, but other Unix-like systems was adopted with the help of members of the BSD development community. As a result, a concerted effort was made to focus on issues that were general to Unix-like systems. In recognition of this widening of scope, the name of the standard was changed to Filesystem Hierarchy Standard or FHS for short.

The FHS is maintained by the Free Standards Group, a non-profit organization consisting of major software and hardware vendors, such as HP, IBM and Dell. Still, the vast majority of the GNU/Linux distributions, including those developed by members of the Free Standards Group, do not follow this proposed standard. In particular, paths specifically created by the FHS editors, such as /media/ and /srv/, do not see widespread usage. Some Unix and GNU/Linux systems break with the FHS in favour of a different approach, as in Gobo GNU/Linux.

Directory structure

All files and directories appear under the root_directory “/”, even if stored on different physical devices.

A description of the hierarchy specified in the FHS

/bin/

Essential command executable (binaries) for all users (e.g., cat, ls, cp)

(especially files required to boot or rescue the system)

/boot/

Boot loader, kernels and initrd files

/dev/

Devices files (e.g., :/dev/null)

/etc/

Host-specific system-wide configuration files (from et cetera)

/home/

Users' home directories

/include/

Standard include files

/lib/

Libraries essential for the binaries in /bin/ and /sbin/

(library required to boot or rescue the system)

/libexec/

Libraries that are not intended to be executed directly by users or shell scripts.

/local/

Tertiary hierarchy for local data installed by the system administrator

  • /local/bin : locally compiled binaries, local shell script, etc.
  • /local/src : Source code (place where to extract and build non hyperbol'ized stuffs)

/mnt/

Temporarily mounted filesystems

/media/

Mount points for removable media such as CD-ROMs (appeared in FHS-2.3)

/opt/

Add-on application software packages

Pre-compiled, non Hyperbola binary distribution (tar'ed..) goes here.

  • /opt/bin/ : Same as for top-level hierarchy
  • /opt/include/ : Same as for top-level hierarchy
  • /opt/lib/ : Same as for top-level hierarchy
  • /opt/sbin/ : Same as for top-level hierarchy
  • /opt/share/ : Same as for top-level hierarchy

/proc/

Virtual filesystem documenting kernel and process status, mostly text files (e.g., uptime, network)

/root/

Home directory for the root user

/sbin/

System administrative binaries (e.g., init, route, ifup) (system binaries)

(files required to boot or rescue the system)

/share/

Architecture-independent (shared) data

/src/

Source code (to build Hyperbola packages. see also /local/src/)

/srv/

Site-specific data which is served by the system.

/sys/

The filesystem for exporting kernel objects.

(many /proc/* files should have been here…)

/tmp/

Temporary files

/var/

Variable data, such as logs, databases, websites, and temporary spool (e-mail..) files

Acknowledgement

This wiki article is based on DebianWiki. We may have removed non-FSDG bits from it.