1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\" Modified Sun Jul 25 11:05:58 1993 by Rik Faith (faith@cs.unc.edu)
6 .\" Modified Sat Feb 10 16:18:03 1996 by Urs Thuermann (urs@isnogud.escape.de)
7 .\" Modified Mon Jun 16 20:02:00 1997 by Nicolás Lichtmaier <nick@debian.org>
8 .\" Modified Mon Feb 6 16:41:00 1999 by Nicolás Lichtmaier <nick@debian.org>
9 .\" Modified Tue Feb 8 16:46:45 2000 by Chris Pepper <pepper@tgg.com>
10 .\" Modified Fri Sep 7 20:32:45 2001 by Tammy Fox <tfox@redhat.com>
11 .TH hier 7 (date) "Linux man-pages (unreleased)"
13 hier \- description of the filesystem hierarchy
15 A typical Linux system has, among others, the following directories:
18 This is the root directory.
19 This is where the whole tree starts.
22 This directory contains executable programs which are needed in
23 single user mode and to bring the system up or repair it.
26 Contains static files for the boot loader.
27 This directory holds only
28 the files which are needed during the boot process.
30 and configuration files should go to
34 The operating system kernel (initrd for example) must be located in either
40 Special or device files, which refer to physical devices.
45 Contains configuration files which are local to the machine.
47 larger software packages, like X11, can have their own subdirectories
50 Site-wide configuration files may be placed here or in
52 Nevertheless, programs should always look for these files in
54 and you may have links for these files to
58 Host-specific configuration files for add-on applications installed
63 This directory contains the configuration files for SGML (optional).
66 When a new user account is created, files from this directory are
67 usually copied into the user's home directory.
70 Configuration files for the X11 window system (optional).
73 This directory contains the configuration files for XML (optional).
76 On machines with home directories for users, these are usually beneath
77 this directory, directly or not.
78 The structure of this directory
79 depends on local administration decisions (optional).
82 This directory should hold those shared libraries that are necessary
83 to boot the system and to run the commands in the root filesystem.
86 These directories are variants of
88 on system which support more than one binary format requiring separate
92 Loadable kernel modules (optional).
95 This directory contains items lost in the filesystem.
96 These items are usually chunks of files mangled as a consequence of
97 a faulty disk or a system crash.
100 This directory contains mount points for removable media such as CD
101 and DVD disks or USB sticks.
102 On systems where more than one device exists
103 for mounting a certain type of media,
104 mount directories can be created by appending a digit
105 to the name of those available above starting with '0',
106 but the unqualified name must also exist.
108 .I /media/floppy[1\-9]
109 Floppy drive (optional).
111 .I /media/cdrom[1\-9]
112 CD-ROM drive (optional).
114 .I /media/cdrecorder[1\-9]
115 CD writer (optional).
118 Zip drive (optional).
121 USB drive (optional).
124 This directory is a mount point for a temporarily mounted filesystem.
125 In some distributions,
127 contains subdirectories intended to be used as mount points for several
128 temporary filesystems.
131 This directory should contain add-on packages that contain static files.
134 This is a mount point for the
136 filesystem, which provides information about running processes and
138 This pseudo-filesystem is described in more detail in
142 This directory is usually the home directory for the root user (optional).
145 This directory contains information which
146 describes the system since it was booted.
147 Once this purpose was served by
149 and programs may continue to use it.
154 this directory holds commands needed to boot the system, but which are
155 usually not executed by normal users.
158 This directory contains site-specific data that is served by this system.
161 This is a mount point for the sysfs filesystem, which provides information
162 about the kernel like
164 but better structured, following the formalism of kobject infrastructure.
167 This directory contains temporary files which may be deleted with no
168 notice, such as by a regular job or at system boot up.
171 This directory is usually mounted from a separate partition.
172 It should hold only shareable, read-only data, so that it can be mounted
173 by various machines running Linux.
176 The X\-Window system, version 11 release 6 (present in FHS 2.3, removed
180 Binaries which belong to the X\-Window system; often, there is a
181 symbolic link from the more traditional
186 Data files associated with the X\-Window system.
188 .I /usr/X11R6/lib/X11
189 These contain miscellaneous files needed to run X; Often, there is a
194 .I /usr/X11R6/include/X11
195 Contains include files needed for compiling programs using the X11
197 Often, there is a symbolic link from
202 This is the primary directory for executable programs.
204 executed by normal users which are not needed for booting or for
205 repairing the system and which are not installed locally should be
206 placed in this directory.
209 Commands for the MH mail handling system (optional).
212 This is the traditional place to look for X11 executables; on Linux, it
213 usually is a symbolic link to
218 .IR /usr/share/dict .
225 Site-wide configuration files to be shared between several machines
226 may be stored in this directory.
227 However, commands should always
228 reference those files using the
233 should point to the appropriate files in
237 Binaries for games and educational programs (optional).
240 Include files for the C compiler.
243 BSD compatibility include files (optional).
246 Include files for the C compiler and the X\-Window system.
248 usually a symbolic link to
249 .IR /usr/X11R6/include/X11 .
252 Include files which declare some assembler functions.
255 .IR /usr/src/linux/include/asm .
257 .I /usr/include/linux
258 This contains information which may change from system release to
259 system release and used to be a symbolic link to
260 .I /usr/src/linux/include/linux
261 to get at operating-system-specific information.
263 (Note that one should have include files there that work correctly with
264 the current libc and in user space.
265 However, Linux kernel source is not
266 designed to be used with user programs and does not know anything
267 about the libc you are using.
268 It is very likely that things will break
272 .I /usr/include/linux
273 point at a random kernel tree.
274 Debian systems don't do this
275 and use headers from a known good kernel
276 version, provided in the libc*\-dev package.)
279 Include files to use with the GNU C++ compiler.
282 Object libraries, including dynamic libraries, plus some executables
283 which usually are not invoked directly.
284 More complicated programs may
285 have whole subdirectories there.
288 Directory contains binaries for internal use only and they are not meant
289 to be executed directly by users shell or scripts.
292 These directories are variants of
294 on system which support more than one binary format requiring separate
295 libraries, except that the symbolic link
296 .IR /usr/lib qual /X11
297 is not required (optional).
300 The usual place for data files associated with X programs, and
301 configuration files for the X system itself.
302 On Linux, it usually is
304 .IR /usr/X11R6/lib/X11 .
307 contains executables and include files for the GNU C compiler,
311 Files for the GNU groff document formatting system.
318 This is where programs which are local to the site typically go.
321 Binaries for programs local to the site.
327 Configuration files associated with locally installed programs.
330 Binaries for locally installed games.
333 Files associated with locally installed programs.
335 .I /usr/local/lib<qual>
336 These directories are variants of
338 on system which support more than one binary format requiring separate
339 libraries (optional).
341 .I /usr/local/include
342 Header files for the local C compiler.
345 Info pages associated with locally installed programs.
348 Man pages associated with locally installed programs.
351 Locally installed programs for system administration.
354 Local application data that can be shared among different architectures
358 Source code for locally installed software.
365 This directory contains program binaries for system administration
366 which are not essential for the boot process, for mounting
368 or for system repair.
371 This directory contains subdirectories with specific application data, that
372 can be shared among different architectures of the same OS.
373 Often one finds stuff here that used to live in
381 Contains color management information, like International Color Consortium (ICC)
382 Color profiles (optional).
385 Contains the word lists used by spell checkers (optional).
387 .I /usr/share/dict/words
388 List of English words (optional).
391 Documentation about installed programs (optional).
394 Static data files for games in
399 Info pages go here (optional).
402 Locale information goes here (optional).
405 Manual pages go here in subdirectories according to the man page sections.
407 .IR /usr/share/man/ locale /man[1\-9]
408 These directories contain manual pages for the
409 specific locale in source code form.
410 Systems which use a unique language and code set for all manual pages
411 may omit the <locale> substring.
414 Miscellaneous data that can be shared among different architectures of the
418 The message catalogs for native language support go here (optional).
421 Postscript Printer Definition (PPD) files (optional).
424 Files for SGML (optional).
426 .I /usr/share/sgml/docbook
427 DocBook DTD (optional).
429 .I /usr/share/sgml/tei
432 .I /usr/share/sgml/html
435 .I /usr/share/sgml/mathml
436 MathML DTD (optional).
438 .I /usr/share/terminfo
439 The database for terminfo (optional).
442 Troff macros that are not distributed with groff (optional).
445 Files for XML (optional).
447 .I /usr/share/xml/docbook
448 DocBook DTD (optional).
450 .I /usr/share/xml/xhtml
451 XHTML DTD (optional).
453 .I /usr/share/xml/mathml
454 MathML DTD (optional).
456 .I /usr/share/zoneinfo
457 Files for timezone information (optional).
460 Source files for different parts of the system, included with some packages
461 for reference purposes.
462 Don't work here with your own projects, as files
463 below /usr should be read-only except when installing software (optional).
466 This was the traditional place for the kernel source.
467 Some distributions put here the source for the default kernel they ship.
468 You should probably use another directory when building your own kernel.
472 This should be a link
475 This link is present only for compatibility reasons and shouldn't be used.
478 This directory contains files which may change in size, such as spool
482 Process accounting logs (optional).
485 This directory is superseded by
487 and should be a symbolic link to
491 Reserved for historical reasons.
494 Data cached for programs.
497 Locally generated fonts (optional).
500 Locally formatted man pages (optional).
503 WWW proxy or cache data (optional).
505 .I /var/cache/<package>
506 Package specific cache data (optional).
508 .IR /var/catman/cat[1\-9] " or " /var/cache/man/cat[1\-9]
509 These directories contain preformatted manual pages according to their
511 (The use of preformatted manual pages is deprecated.)
514 System crash dumps (optional).
517 Reserved for historical reasons.
520 Variable game data (optional).
523 Variable state information for programs.
526 Variable files containing color management information (optional).
529 State directory for hwclock (optional).
532 Miscellaneous state data.
535 X display manager variable data (optional).
538 Editor backup files and state (optional).
541 These directories must be used for all distribution packaging support.
543 .I /var/lib/<package>
544 State data for packages and subsystems (optional).
546 .I /var/lib/<pkgtool>
547 Packaging support files (optional).
554 Lock files are placed in this directory.
555 The naming convention for
560 is the device's name in the filesystem.
561 The format used is that of HDU UUCP lock files, that is, lock files
562 contain a PID as a 10-byte ASCII decimal number, followed by a newline
566 Miscellaneous log files.
575 .IR /var/spool/mail .
578 Reserved for historical reasons.
581 Reserved for historical reasons.
584 Run-time variable files, like files holding process identifiers (PIDs)
585 and logged user information
587 Files in this directory are usually cleared when the system boots.
590 Spooled (or queued) files for various programs.
601 Spooled files for printing (optional).
603 .I /var/spool/lpd/printer
604 Spools for a specific printer (optional).
611 Queued outgoing mail (optional).
614 Spool directory for news (optional).
622 Spooled files for the
624 mail delivery program.
634 this directory holds temporary files stored for an unspecified duration.
637 Database files for NIS,
638 formerly known as the Sun Yellow Pages (YP).
640 .UR https://refspecs.linuxfoundation.org/fhs.shtml
641 The Filesystem Hierarchy Standard (FHS), Version 3.0
643 published March 19, 2015
645 This list is not exhaustive;
646 different distributions and systems may be configured differently.
651 .BR file\-hierarchy (7),
654 The Filesystem Hierarchy Standard