1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" Modified Sun Jul 25 11:05:58 1993 by Rik Faith (faith@cs.unc.edu)
26 .\" Modified Sat Feb 10 16:18:03 1996 by Urs Thuermann (urs@isnogud.escape.de)
27 .\" Modified Mon Jun 16 20:02:00 1997 by Nicolás Lichtmaier <nick@debian.org>
28 .\" Modified Mon Feb 6 16:41:00 1999 by Nicolás Lichtmaier <nick@debian.org>
29 .\" Modified Tue Feb 8 16:46:45 2000 by Chris Pepper <pepper@tgg.com>
30 .\" Modified Fri Sep 7 20:32:45 2001 by Tammy Fox <tfox@redhat.com>
31 .TH HIER 7 2012-08-05 "Linux" "Linux Programmer's Manual"
33 hier \- description of the filesystem hierarchy
35 A typical Linux system has, among others, the following directories:
38 This is the root directory.
39 This is where the whole tree starts.
42 This directory contains executable programs which are needed in
43 single user mode and to bring the system up or repair it.
46 Contains static files for the boot loader.
47 This directory holds only
48 the files which are needed during the boot process.
50 and configuration files should go to
56 Special or device files, which refer to physical devices.
61 Contains configuration files which are local to the machine.
63 larger software packages, like X11, can have their own subdirectories
66 Site-wide configuration files may be placed here or in
68 Nevertheless, programs should always look for these files in
70 and you may have links for these files to
74 Host-specific configuration files for add-on applications installed
79 This directory contains the configuration files for SGML and XML (optional).
82 When a new user account is created, files from this directory are
83 usually copied into the user's home directory.
86 Configuration files for the X11 window system (optional).
89 On machines with home directories for users, these are usually beneath
90 this directory, directly or not.
91 The structure of this directory
92 depends on local administration decisions.
95 This directory should hold those shared libraries that are necessary
96 to boot the system and to run the commands in the root filesystem.
99 This directory contains mount points for removable media such as CD
100 and DVD disks or USB sticks.
103 This directory is a mount point for a temporarily mounted filesystem.
104 In some distributions,
106 contains subdirectories intended to be used as mount points for several
107 temporary filesystems.
110 This directory should contain add-on packages that contain static files.
113 This is a mount point for the
115 filesystem, which provides information about running processes and
117 This pseudo-filesystem is described in more detail in
121 This directory is usually the home directory for the root user (optional).
126 this directory holds commands needed to boot the system, but which are
127 usually not executed by normal users.
130 This directory contains site-specific data that is served by this system.
133 This directory contains temporary files which may be deleted with no
134 notice, such as by a regular job or at system boot up.
137 This directory is usually mounted from a separate partition.
138 It should hold only sharable, read-only data, so that it can be mounted
139 by various machines running Linux.
142 The X\-Window system, version 11 release 6 (optional).
145 Binaries which belong to the X\-Window system; often, there is a
146 symbolic link from the more traditional
151 Data files associated with the X\-Window system.
153 .I /usr/X11R6/lib/X11
154 These contain miscellaneous files needed to run X; Often, there is a
159 .I /usr/X11R6/include/X11
160 Contains include files needed for compiling programs using the X11
162 Often, there is a symbolic link from
167 This is the primary directory for executable programs.
169 executed by normal users which are not needed for booting or for
170 repairing the system and which are not installed locally should be
171 placed in this directory.
174 is the traditional place to look for X11 executables; on Linux, it
175 usually is a symbolic link to
180 .IR /usr/share/dict .
187 Site-wide configuration files to be shared between several machines
188 may be stored in this directory.
189 However, commands should always
190 reference those files using the
195 should point to the appropriate files in
199 Binaries for games and educational programs (optional).
202 Include files for the C compiler.
205 Include files for the C compiler and the X\-Window system.
207 usually a symbolic link to
208 .IR /usr/X11R6/include/X11 .
211 Include files which declare some assembler functions.
214 .IR /usr/src/linux/include/asm .
216 .I /usr/include/linux
217 This contains information which may change from system release to
218 system release and used to be a symbolic link to
219 .I /usr/src/linux/include/linux
220 to get at operating-system-specific information.
222 (Note that one should have include files there that work correctly with
223 the current libc and in user space.
224 However, Linux kernel source is not
225 designed to be used with user programs and does not know anything
226 about the libc you are using.
227 It is very likely that things will break
231 .I /usr/include/linux
232 point at a random kernel tree.
233 Debian systems don't do this
234 and use headers from a known good kernel
235 version, provided in the libc*-dev package.)
238 Include files to use with the GNU C++ compiler.
241 Object libraries, including dynamic libraries, plus some executables
242 which usually are not invoked directly.
243 More complicated programs may
244 have whole subdirectories there.
247 The usual place for data files associated with X programs, and
248 configuration files for the X system itself.
249 On Linux, it usually is
251 .IR /usr/X11R6/lib/X11 .
254 contains executables and include files for the GNU C compiler,
258 Files for the GNU groff document formatting system.
265 This is where programs which are local to the site typically go.
268 Binaries for programs local to the site.
274 Configuration files associated with locally installed programs.
277 Binaries for locally installed games.
280 Files associated with locally installed programs.
282 .I /usr/local/include
283 Header files for the local C compiler.
286 Info pages associated with locally installed programs.
289 Man pages associated with locally installed programs.
292 Locally installed programs for system administration.
295 Local application data that can be shared among different architectures
299 Source code for locally installed software.
306 This directory contains program binaries for system administration
307 which are not essential for the boot process, for mounting
309 or for system repair.
312 This directory contains subdirectories with specific application data, that
313 can be shared among different architectures of the same OS.
314 Often one finds stuff here that used to live in
322 Contains the word lists used by spell checkers.
325 Documentation about installed programs.
328 Static data files for games in
335 Locale information goes here.
338 Manual pages go here in subdirectories according to the man page sections.
340 .I /usr/share/man/<locale>/man[1\-9]
341 These directories contain manual pages for the
342 specific locale in source code form.
343 Systems which use a unique language and code set for all manual pages
344 may omit the <locale> substring.
347 Miscellaneous data that can be shared among different architectures of the
351 The message catalogs for native language support go here.
354 Files for SGML and XML.
356 .I /usr/share/terminfo
357 The database for terminfo.
360 Troff macros that are not distributed with groff.
362 .I /usr/share/zoneinfo
363 Files for timezone information.
366 Source files for different parts of the system, included with some packages
367 for reference purposes.
368 Don't work here with your own projects, as files
369 below /usr should be read-only except when installing software.
372 This was the traditional place for the kernel source.
373 Some distributions put here the source for the default kernel they ship.
374 You should probably use another directory when building your own kernel.
378 This should be a link
381 This link is present only for compatibility reasons and shouldn't be used.
384 This directory contains files which may change in size, such as spool
388 This directory is superseded by
390 and should be a symbolic link to
394 Reserved for historical reasons.
397 Data cached for programs.
399 .IR /var/catman/cat[1\-9] " or " /var/cache/man/cat[1\-9]
400 These directories contain preformatted manual pages according to their
402 (The use of preformatted manual pages is deprecated.)
405 Reserved for historical reasons.
408 Variable state information for programs.
415 Lock files are placed in this directory.
416 The naming convention for
421 is the device's name in the filesystem.
422 The format used is that of HDU UUCP lock files, that is, lock files
423 contain a PID as a 10-byte ASCII decimal number, followed by a newline
427 Miscellaneous log files.
436 .IR /var/spool/mail .
439 Reserved for historical reasons.
442 Reserved for historical reasons.
445 Run-time variable files, like files holding process identifiers (PIDs)
446 and logged user information
448 Files in this directory are usually cleared when the system boots.
451 Spooled (or queued) files for various programs.
462 Spooled files for printing.
469 Queued outgoing mail.
472 Spool directory for news.
479 Spooled files for the
481 mail delivery program.
490 this directory holds temporary files stored for an unspecified duration.
493 Database files for NIS.
495 The Filesystem Hierarchy Standard, Version 2.2
496 .UR http://www.pathname.com\:/fhs/
499 This list is not exhaustive; different systems may be configured
507 The Filesystem Hierarchy Standard