9.1.1. File System Structure
The location of all files and directories must comply with the Filesystem Hierarchy Standard (FHS), version 3.0, with the exceptions noted below, and except where doing so would violate other terms of Debian Policy. The following exceptions to the FHS apply:
The FHS requirement that architecture-independent application-specific static files be located in
/usr/share
is relaxed to a suggestion. In particular, a subdirectory of/usr/lib
may be used by a package (or a collection of packages) to hold a mixture of architecture-independent and architecture-dependent files. However, when a directory is entirely composed of architecture-independent files, it should be located in/usr/share
.The optional rules related to user specific configuration files for applications are stored in the user’s home directory are relaxed. It is recommended that such files start with the ‘
.
’ character (a “dot file”), and if an application needs to create more than one dot file then the preferred placement is in a subdirectory with a name starting with a ‘.’ character, (a “dot directory”). In this case it is recommended the configuration files not start with the ‘.’ character.Only the dynamic linker and libc are allowed to install files in
/lib64
.The requirement for object files, internal binaries, and libraries, including
libc.so.*
, to be located directly under/lib{,32}
and/usr/lib{,32}
is amended, permitting files to instead be installed to/lib/triplet
and/usr/lib/triplet
, wheretriplet
is the value returned bydpkg-architecture -qDEB_HOST_MULTIARCH
for the architecture of the package. Packages may not install files to any triplet path other than the one matching the architecture of that package; for instance, anArchitecture: amd64
package containing 32-bit x86 libraries may not install these libraries to/usr/lib/i386-linux-gnu
. 1No package for a 64 bit architecture may install files in
/usr/lib64/
or in a subdirectory of it.The requirement for C and C++ headers files to be accessible through the search path
/usr/include/
is amended, permitting files to be accessible through the search path/usr/include/triplet
wheretriplet
is as above. 2Applications may also use a single subdirectory under
/usr/lib/triplet
.The execution time linker/loader, ld*, must still be made available in the existing location under /lib or /lib64 since this is part of the ELF ABI for the architecture.
The requirement that
/usr/local/share/man
be “synonymous” with/usr/local/man
is relaxed to a recommendationThe requirement that window managers with a single configuration file call it
system.*wmrc
is removed, as is the restriction that the window manager subdirectory be named identically to the window manager name itself.The requirement that boot manager configuration files live in
/etc
, or at least are symlinked there, is relaxed to a recommendation./var/run
is required to be a symbolic link to/run
, and/var/lock
is required to be a symbolic link to/run/lock
.The
/var/www
directory is additionally allowed.The requirement for
/usr/local/share/color
to exist if/usr/share/color
exists is relaxed to a recommendation.The requirement for
/usr/local/libqual
to exist if/libqual
or/usr/libqual
exists (wherelibqual
is a variant oflib
such aslib32
orlib64
) is removed.On GNU/Hurd systems, the following additional directories are allowed in the root filesystem:
/hurd
and/servers
. 3As an exception to the requirement for there to be no subdirectories in
/usr/bin
, themh
mail-handling suite may create/usr/bin/mh/
, as was allowed in FHS version 2.3. Other subdirectories are not allowed.
The version of this document referred here can be found in the debian-policy
package or on FHS (Debian copy) alongside this manual (or, if you have the debian-policy installed, you can try FHS (local copy)). The latest version, which may be a more recent version, may be found on FHS (upstream). Specific questions about following the standard may be asked on the debian-devel
mailing list, or referred to the FHS mailing list (see the FHS web site for more information).