1 .\" (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 2001-09-07 "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. This is where the whole tree starts.
39 This directory contains executable programs which are needed in
40 single user mode and to bring the system up or repair it.
43 Contains static files for the boot loader. This directory only holds
44 the files which are needed during the boot process. The map installer
45 and configuration files should go to
51 Special or device files, which refer to physical devices. See
55 If both MS\-DOS and Linux are run on one computer, this is a typical
56 place to mount a DOS file system.
59 Contains configuration files which are local to the machine. Some
60 larger software packages, like X11, can have their own subdirectories
63 Site-wide configuration files may be placed here or in
65 Nevertheless, programs should always look for these files in
67 and you may have links for these files to
71 Host-specific configuration files for add-on applications installed
76 This directory contains the configuration files for SGML and XML (optional).
79 When a new user account is created, files from this directory are
80 usually copied into the user's home directory.
83 Configuration files for the X11 window system (optional).
86 On machines with home directories for users, these are usually beneath
87 this directory, directly or not. The structure of this directory
88 depends on local administration decisions.
91 This directory should hold those shared libraries that are necessary
92 to boot the system and to run the commands in the root filesystem.
95 This directory contains mount points for temporarily mounted filesystems
98 This directory should contain add-on packages that contain static files.
101 This is a mount point for the
103 filesystem, which provides information about running processes and
104 the kernel. This pseudo-file system is described in more detail in
108 This directory is usually the home directory for the root user (optional).
113 this directory holds commands needed to boot the system, but which are
114 usually not executed by normal users.
117 This directory contains temporary files which may be deleted with no
118 notice, such as by a regular job or at system boot up.
121 This directory is usually mounted from a separate partition. It
122 should hold only sharable, read-only data, so that it can be mounted
123 by various machines running Linux.
126 The X\-Window system, version 11 release 6 (optional).
129 Binaries which belong to the X\-Windows system; often, there is a
130 symbolic link from the more traditional
135 Data files associated with the X\-Windows system.
137 .I /usr/X11R6/lib/X11
138 These contain miscellaneous files needed to run X; Often, there is a
143 .I /usr/X11R6/include/X11
144 Contains include files needed for compiling programs using the X11
145 window system. Often, there is a symbolic link from
150 This is the primary directory for executable programs. Most programs
151 executed by normal users which are not needed for booting or for
152 repairing the system and which are not installed locally should be
153 placed in this directory.
156 is the traditional place to look for X11 executables; on Linux, it
157 usually is a symbolic link to
162 .IR /usr/share/dict .
169 Site-wide configuration files to be shared between several machines
170 may be stored in this directory. However, commands should always
171 reference those files using the
173 directory. Links from files in
175 should point to the appropriate files in
179 Binaries for games and educational programs (optional).
182 Include files for the C compiler.
185 Include files for the C compiler and the X\-Windows system. This is
186 usually a symbolic link to
187 .I /usr/X11R6/include/X11.
190 Include files which declare some assembler functions. This used to be a
192 .IR /usr/src/linux/include/asm .
194 .I /usr/include/linux
195 This contains information which may change from system release to
196 system release and used to be a symbolic link to
197 .I /usr/src/linux/include/linux
198 to get at operating system specific information.
200 (Note that one should have include files there that work correctly with
201 the current libc and in user space. However, Linux kernel source is not
202 designed to be used with user programs and does not know anything
203 about the libc you are using. It is very likely that things will break
207 .I /usr/include/linux
208 point at a random kernel tree. Debian systems don't do this
209 and use headers from a known good kernel
210 version, provided in the libc*-dev package.)
213 Include files to use with the GNU C++ compiler.
216 Object libraries, including dynamic libraries, plus some executables
217 which usually are not invoked directly. More complicated programs may
218 have whole subdirectories there.
221 The usual place for data files associated with X programs, and
222 configuration files for the X system itself. On Linux, it usually is
224 .IR /usr/X11R6/lib/X11 .
227 contains executables and include files for the GNU C compiler,
231 Files for the GNU groff document formatting system.
238 This is where programs which are local to the site typically go.
241 Binaries for programs local to the site.
247 Configuration files associated with locally installed programs.
250 Binaries for locally installed games.
253 Files associated with locally installed programs.
255 .I /usr/local/include
256 Header files for the local C compiler.
259 Info pages associated with locally installed programs.
262 Man pages associated with locally installed programs.
265 Locally installed programs for system administration.
268 Local application data that can be shared among different architectures
272 Source code for locally installed software.
279 This directory contains program binaries for system administration
280 which are not essential for the boot process, for mounting
282 or for system repair.
285 This directory contains subdirectories with specific application data, that
286 can be shared among different architectures of the same OS.
287 Often one finds stuff here that used to live in
295 Contains the word lists used by spell checkers.
298 Documentation about installed programs.
301 Static data files for games in
308 Locale information goes here.
311 Manpages go here in subdirectories according to the man page sections.
313 .I /usr/share/man/<locale>/man[1-9]
314 These directories contain manual pages for the specific locale in source code
315 form. Systems which use a unique language and code set for all manual pages
316 may omit the <locale> substring.
319 Miscellaneous data that can be shared among different architectures of the
323 The message catalogs for native language support go here.
326 Files for SGML and XML.
328 .I /usr/share/terminfo
329 The datebase for terminfo.
332 Troff macros that are not distributed with groff.
334 .I /usr/share/zoneinfo
335 Files for timezone information.
338 Source files for different parts of the system, included with some packages
339 for reference purposes. Don't work here with your own projects, as files
340 below /usr should be read-only except when installing software.
343 This was the traditional place for the kernel source.
344 Some distributions put here the source for the default kernel they ship.
345 You should probably use another directory when building your own kernel.
348 Obsolete. This should be a link
351 This link is present only for compatibility reasons and shouldn't be used.
354 This directory contains files which may change in size, such as spool
358 This directory is superseded by
360 and should be a symbolic link to
364 Reserved for historical reasons.
367 Data cached for programs.
369 .IR /var/catman/cat[1-9] " or " /var/cache/man/cat[1-9]
370 These directories contain preformatted manual pages according to their
371 man page section. (The use of preformatted manual pages is deprecated.)
374 Reserved for historical reasons.
377 Variable state information for programs.
384 Lock files are placed in this directory. The naming convention for
389 is the device's name in the filesystem.
390 The format used is that of HDU UUCP lock files, i.e. lock files
391 contain a PID as a 10-byte ASCII decimal number, followed by a newline
395 Miscellaneous log files.
402 Users' mailboxes. Replaces
403 .IR /var/spool/mail .
406 Reserved for historical reasons.
409 Reserved for historical reasons.
412 Run-time variable files, like files holding process identifiers (PIDs)
413 and logged user information
415 Files in this directory are usually cleared when the system boots.
418 Spooled (or queued) files for various programs.
429 Spooled files for printing.
436 Queued outgoing mail.
439 Spool directory for news.
446 Spooled files for the
448 mail delivery program.
457 this directory holds temporary files stored for an unspecified duration.
460 Database files for NIS.
462 The Filesystem Hierarchy Standard, Version 2.2 <http://www.pathname.com/fhs/>
464 This list is not exhaustive; different systems may be configured
471 The Filesystem Hierarchy Standard