HIER(7)                   (2020-06-09)                    HIER(7)

          hier - description of the filesystem hierarchy

          A typical Linux system has, among others, the following

          /    This is the root directory.  This is where the whole
               tree starts.

          /bin This directory contains executable programs which are
               needed in single user mode and to bring the system up
               or repair it.

               Contains static files for the boot loader.  This direc-
               tory holds only the files which are needed during the
               boot process.  The map installer and configuration
               files should go to /sbin and /etc. The operating system
               kernel (initrd for example) must be located in either /
               or /boot.

          /dev Special or device files, which refer to physical
               devices.  See mknod(1).

          /etc Contains configuration files which are local to the
               machine.  Some larger software packages, like X11, can
               have their own subdirectories below /etc. Site-wide
               configuration files may be placed here or in /usr/etc.
               Nevertheless, programs should always look for these
               files in /etc and you may have links for these files to

               Host-specific configuration files for add-on applica-
               tions installed in /opt.

               This directory contains the configuration files for
               SGML (optional).

               When a new user account is created, files from this
               directory are usually copied into the user's home

               Configuration files for the X11 window system

     Page 1                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               This directory contains the configuration files for XML

               On machines with home directories for users, these are
               usually beneath this directory, directly or not.  The
               structure of this directory depends on local adminis-
               tration decisions (optional).

          /lib This directory should hold those shared libraries that
               are necessary to boot the system and to run the com-
               mands in the root filesystem.

               These directories are variants of /lib on system which
               support more than one binary format requiring separate
               libraries (optional).

               Loadable kernel modules (optional).

               This directory contains items lost in the filesystem.
               These items are usually chunks of files mangled as a
               consequence of a faulty disk or a system crash.

               This directory contains mount points for removable
               media such as CD and DVD disks or USB sticks.  On sys-
               tems where more than one device exists for mounting a
               certain type of media, mount directories can be created
               by appending a digit to the name of those available
               above starting with '0', but the unqualified name must
               also exist.

               Floppy drive (optional).

               CD-ROM drive (optional).

               CD writer (optional).

               Zip drive (optional).

               USB drive (optional).

          /mnt This directory is a mount point for a temporarily

     Page 2                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               mounted filesystem.  In some distributions, /mnt con-
               tains subdirectories intended to be used as mount
               points for several temporary filesystems.

          /opt This directory should contain add-on packages that con-
               tain static files.

               This is a mount point for the proc filesystem, which
               provides information about running processes and the
               kernel.  This pseudo-filesystem is described in more
               detail in proc(5).

               This directory is usually the home directory for the
               root user (optional).

          /run This directory contains information which describes the
               system since it was booted.  Once this purpose was
               served by /var/run and programs may continue to use it.

               Like /bin, this directory holds commands needed to boot
               the system, but which are usually not executed by nor-
               mal users.

          /srv This directory contains site-specific data that is
               served by this system.

          /sys This is a mount point for the sysfs filesystem, which
               provides information about the kernel like /proc, but
               better structured, following the formalism of kobject

          /tmp This directory contains temporary files which may be
               deleted with no notice, such as by a regular job or at
               system boot up.

          /usr This directory is usually mounted from a separate par-
               tition.  It should hold only shareable, read-only data,
               so that it can be mounted by various machines running

               The X-Window system, version 11 release 6 (present in
               FHS 2.3, removed in FHS 3.0).

               Binaries which belong to the X-Window system; often,
               there is a symbolic link from the more traditional
               /usr/bin/X11 to here.

     Page 3                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               Data files associated with the X-Window system.

               These contain miscellaneous files needed to run X;
               Often, there is a symbolic link from /usr/lib/X11 to
               this directory.

               Contains include files needed for compiling programs
               using the X11 window system.  Often, there is a sym-
               bolic link from /usr/include/X11 to this directory.

               This is the primary directory for executable programs.
               Most programs executed by normal users which are not
               needed for booting or for repairing the system and
               which are not installed locally should be placed in
               this directory.

               Commands for the MH mail handling system (optional).

               is the traditional place to look for X11 executables;
               on Linux, it usually is a symbolic link to

               Replaced by /usr/share/dict.

               Replaced by /usr/share/doc.

               Site-wide configuration files to be shared between sev-
               eral machines may be stored in this directory.  How-
               ever, commands should always reference those files
               using the /etc directory.  Links from files in /etc
               should point to the appropriate files in /usr/etc.

               Binaries for games and educational programs (optional).

               Include files for the C compiler.

               BSD compatibility include files (optional).

               Include files for the C compiler and the X-Window

     Page 4                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               system.  This is usually a symbolic link to

               Include files which declare some assembler functions.
               This used to be a symbolic link to

               This contains information which may change from system
               release to system release and used to be a symbolic
               link to /usr/src/linux/include/linux to get at
               operating-system-specific information.

               (Note that one should have include files there that
               work correctly with the current libc and in user space.
               However, Linux kernel source is not designed to be used
               with user programs and does not know anything about the
               libc you are using.  It is very likely that things will
               break if you let /usr/include/asm and
               /usr/include/linux point at a random kernel tree.
               Debian systems don't do this and use headers from a
               known good kernel version, provided in the libc*-dev

               Include files to use with the GNU C++ compiler.

               Object libraries, including dynamic libraries, plus
               some executables which usually are not invoked
               directly.  More complicated programs may have whole
               subdirectories there.

               Directory contains binaries for internal use only and
               they are not meant to be executed directly by users
               shell or scripts.

               These directories are variants of /usr/lib on system
               which support more than one binary format requiring
               separate libraries, except that the symbolic link
               /usr/lib<qual>/X11 is not required (optional).

               The usual place for data files associated with X pro-
               grams, and configuration files for the X system itself.
               On Linux, it usually is a symbolic link to


     Page 5                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               contains executables and include files for the GNU C
               compiler, gcc(1).

               Files for the GNU groff document formatting system.

               Files for uucp(1).

               This is where programs which are local to the site typ-
               ically go.

               Binaries for programs local to the site.

               Local documentation.

               Configuration files associated with locally installed

               Binaries for locally installed games.

               Files associated with locally installed programs.

               These directories are variants of /usr/local/lib on
               system which support more than one binary format
               requiring separate libraries (optional).

               Header files for the local C compiler.

               Info pages associated with locally installed programs.

               Man pages associated with locally installed programs.

               Locally installed programs for system administration.

               Local application data that can be shared among differ-
               ent architectures of the same OS.

               Source code for locally installed software.

     Page 6                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               Replaced by /usr/share/man.

               This directory contains program binaries for system
               administration which are not essential for the boot
               process, for mounting /usr, or for system repair.

               This directory contains subdirectories with specific
               application data, that can be shared among different
               architectures of the same OS.  Often one finds stuff
               here that used to live in /usr/doc or /usr/lib or

               Contains color management information, like Interna-
               tional Color Consortium (ICC) Color profiles

               Contains the word lists used by spell checkers

               List of English words (optional).

               Documentation about installed programs (optional).

               Static data files for games in /usr/games (optional).

               Info pages go here (optional).

               Locale information goes here (optional).

               Manual pages go here in subdirectories according to the
               man page sections.

               These directories contain manual pages for the specific
               locale in source code form.  Systems which use a unique
               language and code set for all manual pages may omit the
               <locale> substring.

               Miscellaneous data that can be shared among different
               architectures of the same OS.

     Page 7                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               The message catalogs for native language support go
               here (optional).

               Postscript Printer Definition (PPD) files (optional).

               Files for SGML (optional).

               DocBook DTD (optional).

               TEI DTD (optional).

               HTML DTD (optional).

               MathML DTD (optional).

               The database for terminfo (optional).

               Troff macros that are not distributed with groff

               Files for XML (optional).

               DocBook DTD (optional).

               XHTML DTD (optional).

               MathML DTD (optional).

               Files for timezone information (optional).

               Source files for different parts of the system,
               included with some packages for reference purposes.
               Don't work here with your own projects, as files below
               /usr should be read-only except when installing soft-
               ware (optional).


     Page 8                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               This was the traditional place for the kernel source.
               Some distributions put here the source for the default
               kernel they ship.  You should probably use another
               directory when building your own kernel.

               Obsolete.  This should be a link to /var/tmp. This link
               is present only for compatibility reasons and shouldn't
               be used.

          /var This directory contains files which may change in size,
               such as spool and log files.

               Process accounting logs (optional).

               This directory is superseded by /var/log and should be
               a symbolic link to /var/log.

               Reserved for historical reasons.

               Data cached for programs.

               Locally generated fonts (optional).

               Locally formatted man pages (optional).

               WWW proxy or cache data (optional).

               Package specific cache data (optional).

               These directories contain preformatted manual pages
               according to their man page section.  (The use of pre-
               formatted manual pages is deprecated.)

               System crash dumps (optional).

               Reserved for historical reasons.

               Variable game data (optional).

     Page 9                        Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               Variable state information for programs.

               Variable files containing color management information

               State directory for hwclock (optional).

               Miscellaneous state data.

               X display manager variable data (optional).

               Editor backup files and state (optional).

               These directories must be used for all distribution
               packaging support.

               State data for packages and subsystems (optional).

               Packaging support files (optional).

               Variable data for /usr/local.

               Lock files are placed in this directory.  The naming
               convention for device lock files is LCK..<device> where
               <device> is the device's name in the filesystem.  The
               format used is that of HDU UUCP lock files, that is,
               lock files contain a PID as a 10-byte ASCII decimal
               number, followed by a newline character.

               Miscellaneous log files.

               Variable data for /opt.

               Users' mailboxes.  Replaces /var/spool/mail.

               Reserved for historical reasons.

     Page 10                       Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

               Reserved for historical reasons.

               Run-time variable files, like files holding process
               identifiers (PIDs) and logged user information (utmp).
               Files in this directory are usually cleared when the
               system boots.

               Spooled (or queued) files for various programs.

               Spooled jobs for at(1).

               Spooled jobs for cron(8).

               Spooled files for printing (optional).

               Spools for a specific printer (optional).

               Replaced by /var/mail.

               Queued outgoing mail (optional).

               Spool directory for news (optional).

               Spooled files for rwhod(8) (optional).

               Spooled files for the smail(1) mail delivery program.

               Spooled files for uucp(1) (optional).

               Like /tmp, this directory holds temporary files stored
               for an unspecified duration.

               Database files for NIS, formerly known as the Sun Yel-
               low Pages (YP).

          The Filesystem Hierarchy Standard (FHS), Version 3.0,

     Page 11                       Linux             (printed 5/24/22)

     HIER(7)                   (2020-06-09)                    HIER(7)

          published March 19, 2015

          This list is not exhaustive; different distributions and
          systems may be configured differently.

          find(1), ln(1), proc(5), file-hierarchy(7), mount(8)

          The Filesystem Hierarchy Standard

          This page is part of release 5.10 of the Linux man-pages
          project.  A description of the project, information about
          reporting bugs, and the latest version of this page, can be
          found at https://www.kernel.org/doc/man-pages/.

     Page 12                       Linux             (printed 5/24/22)