1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Modified Sun Jul 25 11:05:58 1993 by Rik Faith (faith@cs.unc.edu)
24 .\" Modified Sat Feb 10 16:18:03 1996 by Urs Thuermann (urs@isnogud.escape.de)
25 .\" Modified Mon Jun 16 20:02:00 1997 by Nicolás Lichtmaier <nick@debian.org>
26 .\" Modified Mon Feb 6 16:41:00 1999 by Nicolás Lichtmaier <nick@debian.org>
27 .\" Modified Tue Feb 8 16:46:45 2000 by Chris Pepper <pepper@tgg.com>
28 .\" Modified Fri Sep 7 20:32:45 2001 by Tammy Fox <tfox@redhat.com>
29 .TH HIER 7 2009-03-30 "Linux" "Linux Programmer's Manual"
31 hier \- Description of the file system hierarchy
33 A typical Linux system has, among others, the following directories:
36 This is the root directory.
37 This is where the whole tree starts.
40 This directory contains executable programs which are needed in
41 single user mode and to bring the system up or repair it.
44 Contains static files for the boot loader.
45 This directory only holds
46 the files which are needed during the boot process.
48 and configuration files should go to
54 Special or device files, which refer to physical devices.
59 Contains configuration files which are local to the machine.
61 larger software packages, like X11, can have their own subdirectories
64 Site-wide configuration files may be placed here or in
66 Nevertheless, programs should always look for these files in
68 and you may have links for these files to
72 Host-specific configuration files for add-on applications installed
77 This directory contains the configuration files for SGML and XML (optional).
80 When a new user account is created, files from this directory are
81 usually copied into the user's home directory.
84 Configuration files for the X11 window system (optional).
87 On machines with home directories for users, these are usually beneath
88 this directory, directly or not.
89 The structure of this directory
90 depends on local administration decisions.
93 This directory should hold those shared libraries that are necessary
94 to boot the system and to run the commands in the root file system.
97 This directory contains mount points for removable media such as CD
98 and DVD disks or USB sticks.
101 This directory is a mount point for a temporarily mounted file system.
102 In some distributions,
104 contains subdirectories intended to be used as mount points for several
105 temporary file systems.
108 This directory should contain add-on packages that contain static files.
111 This is a mount point for the
113 file system, which provides information about running processes and
115 This pseudo-file system is described in more detail in
119 This directory is usually the home directory for the root user (optional).
124 this directory holds commands needed to boot the system, but which are
125 usually not executed by normal users.
128 This directory contains site-specific data that is served by this system.
131 This directory contains temporary files which may be deleted with no
132 notice, such as by a regular job or at system boot up.
135 This directory is usually mounted from a separate partition.
136 It should hold only sharable, read-only data, so that it can be mounted
137 by various machines running Linux.
140 The X\-Window system, version 11 release 6 (optional).
143 Binaries which belong to the X\-Window system; often, there is a
144 symbolic link from the more traditional
149 Data files associated with the X\-Window system.
151 .I /usr/X11R6/lib/X11
152 These contain miscellaneous files needed to run X; Often, there is a
157 .I /usr/X11R6/include/X11
158 Contains include files needed for compiling programs using the X11
160 Often, there is a symbolic link from
165 This is the primary directory for executable programs.
167 executed by normal users which are not needed for booting or for
168 repairing the system and which are not installed locally should be
169 placed in this directory.
172 is the traditional place to look for X11 executables; on Linux, it
173 usually is a symbolic link to
178 .IR /usr/share/dict .
185 Site-wide configuration files to be shared between several machines
186 may be stored in this directory.
187 However, commands should always
188 reference those files using the
193 should point to the appropriate files in
197 Binaries for games and educational programs (optional).
200 Include files for the C compiler.
203 Include files for the C compiler and the X\-Window system.
205 usually a symbolic link to
206 .IR /usr/X11R6/include/X11 .
209 Include files which declare some assembler functions.
212 .IR /usr/src/linux/include/asm .
214 .I /usr/include/linux
215 This contains information which may change from system release to
216 system release and used to be a symbolic link to
217 .I /usr/src/linux/include/linux
218 to get at operating system specific information.
220 (Note that one should have include files there that work correctly with
221 the current libc and in user space.
222 However, Linux kernel source is not
223 designed to be used with user programs and does not know anything
224 about the libc you are using.
225 It is very likely that things will break
229 .I /usr/include/linux
230 point at a random kernel tree.
231 Debian systems don't do this
232 and use headers from a known good kernel
233 version, provided in the libc*-dev package.)
236 Include files to use with the GNU C++ compiler.
239 Object libraries, including dynamic libraries, plus some executables
240 which usually are not invoked directly.
241 More complicated programs may
242 have whole subdirectories there.
245 The usual place for data files associated with X programs, and
246 configuration files for the X system itself.
247 On Linux, it usually is
249 .IR /usr/X11R6/lib/X11 .
252 contains executables and include files for the GNU C compiler,
256 Files for the GNU groff document formatting system.
263 This is where programs which are local to the site typically go.
266 Binaries for programs local to the site.
272 Configuration files associated with locally installed programs.
275 Binaries for locally installed games.
278 Files associated with locally installed programs.
280 .I /usr/local/include
281 Header files for the local C compiler.
284 Info pages associated with locally installed programs.
287 Man pages associated with locally installed programs.
290 Locally installed programs for system administration.
293 Local application data that can be shared among different architectures
297 Source code for locally installed software.
304 This directory contains program binaries for system administration
305 which are not essential for the boot process, for mounting
307 or for system repair.
310 This directory contains subdirectories with specific application data, that
311 can be shared among different architectures of the same OS.
312 Often one finds stuff here that used to live in
320 Contains the word lists used by spell checkers.
323 Documentation about installed programs.
326 Static data files for games in
333 Locale information goes here.
336 Manual pages go here in subdirectories according to the man page sections.
338 .I /usr/share/man/<locale>/man[1\-9]
339 These directories contain manual pages for the
340 specific locale in source code form.
341 Systems which use a unique language and code set for all manual pages
342 may omit the <locale> substring.
345 Miscellaneous data that can be shared among different architectures of the
349 The message catalogs for native language support go here.
352 Files for SGML and XML.
354 .I /usr/share/terminfo
355 The database for terminfo.
358 Troff macros that are not distributed with groff.
360 .I /usr/share/zoneinfo
361 Files for timezone information.
364 Source files for different parts of the system, included with some packages
365 for reference purposes.
366 Don't work here with your own projects, as files
367 below /usr should be read-only except when installing software.
370 This was the traditional place for the kernel source.
371 Some distributions put here the source for the default kernel they ship.
372 You should probably use another directory when building your own kernel.
376 This should be a link
379 This link is present only for compatibility reasons and shouldn't be used.
382 This directory contains files which may change in size, such as spool
386 This directory is superseded by
388 and should be a symbolic link to
392 Reserved for historical reasons.
395 Data cached for programs.
397 .IR /var/catman/cat[1\-9] " or " /var/cache/man/cat[1\-9]
398 These directories contain preformatted manual pages according to their
400 (The use of preformatted manual pages is deprecated.)
403 Reserved for historical reasons.
406 Variable state information for programs.
413 Lock files are placed in this directory.
414 The naming convention for
419 is the device's name in the file system.
420 The format used is that of HDU UUCP lock files, that is, lock files
421 contain a PID as a 10-byte ASCII decimal number, followed by a newline
425 Miscellaneous log files.
434 .IR /var/spool/mail .
437 Reserved for historical reasons.
440 Reserved for historical reasons.
443 Run-time variable files, like files holding process identifiers (PIDs)
444 and logged user information
446 Files in this directory are usually cleared when the system boots.
449 Spooled (or queued) files for various programs.
460 Spooled files for printing.
467 Queued outgoing mail.
470 Spool directory for news.
477 Spooled files for the
479 mail delivery program.
488 this directory holds temporary files stored for an unspecified duration.
491 Database files for NIS.
493 The Filesystem Hierarchy Standard, Version 2.2 <http://www.pathname.com/fhs/>.
495 This list is not exhaustive; different systems may be configured
503 The Filesystem Hierarchy Standard