]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man7/hier.7
hier.7: First patch of a series to achieve compliance with FHS 2.3
[thirdparty/man-pages.git] / man7 / hier.7
CommitLineData
bf5a7247 1.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
fea681da 2.\"
93015253 3.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
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.
7.\"
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.
c13182ef 12.\"
fea681da
MK
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
19.\" professionally.
c13182ef 20.\"
fea681da
MK
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
c08df37a 24.\"
fea681da
MK
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)
e00c3a07
MK
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>
fea681da
MK
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>
608bf950 31.TH HIER 7 2012-08-05 "Linux" "Linux Programmer's Manual"
fea681da 32.SH NAME
9ee4a2b6 33hier \- description of the filesystem hierarchy
fea681da
MK
34.SH DESCRIPTION
35A typical Linux system has, among others, the following directories:
36.TP
37.I /
c13182ef
MK
38This is the root directory.
39This is where the whole tree starts.
fea681da
MK
40.TP
41.I /bin
42This directory contains executable programs which are needed in
43single user mode and to bring the system up or repair it.
44.TP
45.I /boot
c13182ef 46Contains static files for the boot loader.
33a0ccb2 47This directory holds only
c13182ef
MK
48the files which are needed during the boot process.
49The map installer
fea681da
MK
50and configuration files should go to
51.I /sbin
52and
53.IR /etc .
54.TP
55.I /dev
c13182ef
MK
56Special or device files, which refer to physical devices.
57See
4a225b7a 58.BR mknod (1).
fea681da 59.TP
fea681da 60.I /etc
c13182ef
MK
61Contains configuration files which are local to the machine.
62Some
fea681da
MK
63larger software packages, like X11, can have their own subdirectories
64below
65.IR /etc .
66Site-wide configuration files may be placed here or in
67.IR /usr/etc .
68Nevertheless, programs should always look for these files in
69.I /etc
70and you may have links for these files to
71.IR /usr/etc .
72.TP
73.I /etc/opt
74Host-specific configuration files for add-on applications installed
c13182ef 75in
fea681da
MK
76.IR /opt .
77.TP
78.I /etc/sgml
79This directory contains the configuration files for SGML and XML (optional).
80.TP
81.I /etc/skel
82When a new user account is created, files from this directory are
83usually copied into the user's home directory.
84.TP
85.I /etc/X11
86Configuration files for the X11 window system (optional).
87.TP
88.I /home
89On machines with home directories for users, these are usually beneath
c13182ef
MK
90this directory, directly or not.
91The structure of this directory
fea681da
MK
92depends on local administration decisions.
93.TP
94.I /lib
95This directory should hold those shared libraries that are necessary
9ee4a2b6 96to boot the system and to run the commands in the root filesystem.
fea681da 97.TP
2addd910 98.I /media
3af4adf5 99This directory contains mount points for removable media such as CD
de9957dc 100and DVD disks or USB sticks.
2addd910 101.TP
fea681da 102.I /mnt
9ee4a2b6 103This directory is a mount point for a temporarily mounted filesystem.
de9957dc
MK
104In some distributions,
105.I /mnt
106contains subdirectories intended to be used as mount points for several
9ee4a2b6 107temporary filesystems.
fea681da
MK
108.TP
109.I /opt
110This directory should contain add-on packages that contain static files.
111.TP
112.I /proc
113This is a mount point for the
114.I proc
9ee4a2b6 115filesystem, which provides information about running processes and
c13182ef 116the kernel.
9ee4a2b6 117This pseudo-filesystem is described in more detail in
fea681da
MK
118.BR proc (5).
119.TP
120.I /root
121This directory is usually the home directory for the root user (optional).
122.TP
123.I /sbin
124Like
125.IR /bin ,
126this directory holds commands needed to boot the system, but which are
127usually not executed by normal users.
128.TP
7a1a6b6a
MK
129.I /srv
130This directory contains site-specific data that is served by this system.
131.TP
fea681da
MK
132.I /tmp
133This directory contains temporary files which may be deleted with no
134notice, such as by a regular job or at system boot up.
135.TP
136.I /usr
c13182ef
MK
137This directory is usually mounted from a separate partition.
138It should hold only sharable, read-only data, so that it can be mounted
fea681da
MK
139by various machines running Linux.
140.TP
141.I /usr/X11R6
142The X\-Window system, version 11 release 6 (optional).
143.TP
144.I /usr/X11R6/bin
de9957dc 145Binaries which belong to the X\-Window system; often, there is a
fea681da
MK
146symbolic link from the more traditional
147.I /usr/bin/X11
148to here.
149.TP
150.I /usr/X11R6/lib
de9957dc 151Data files associated with the X\-Window system.
fea681da
MK
152.TP
153.I /usr/X11R6/lib/X11
154These contain miscellaneous files needed to run X; Often, there is a
c13182ef 155symbolic link from
fea681da
MK
156.I /usr/lib/X11
157to this directory.
158.TP
159.I /usr/X11R6/include/X11
160Contains include files needed for compiling programs using the X11
c13182ef
MK
161window system.
162Often, there is a symbolic link from
fea681da
MK
163.I /usr/include/X11
164to this directory.
165.TP
166.I /usr/bin
c13182ef
MK
167This is the primary directory for executable programs.
168Most programs
fea681da
MK
169executed by normal users which are not needed for booting or for
170repairing the system and which are not installed locally should be
171placed in this directory.
172.TP
173.I /usr/bin/X11
174is the traditional place to look for X11 executables; on Linux, it
175usually is a symbolic link to
176.IR /usr/X11R6/bin .
177.TP
178.I /usr/dict
179Replaced by
180.IR /usr/share/dict .
181.TP
182.I /usr/doc
183Replaced by
184.IR /usr/share/doc .
185.TP
186.I /usr/etc
187Site-wide configuration files to be shared between several machines
c13182ef
MK
188may be stored in this directory.
189However, commands should always
fea681da
MK
190reference those files using the
191.I /etc
c13182ef
MK
192directory.
193Links from files in
fea681da
MK
194.I /etc
195should point to the appropriate files in
196.IR /usr/etc .
197.TP
198.I /usr/games
199Binaries for games and educational programs (optional).
200.TP
201.I /usr/include
202Include files for the C compiler.
203.TP
204.I /usr/include/X11
de9957dc 205Include files for the C compiler and the X\-Window system.
c13182ef 206This is
fea681da 207usually a symbolic link to
a5e0a0e4 208.IR /usr/X11R6/include/X11 .
fea681da
MK
209.TP
210.I /usr/include/asm
c13182ef
MK
211Include files which declare some assembler functions.
212This used to be a
fea681da
MK
213symbolic link to
214.IR /usr/src/linux/include/asm .
215.TP
216.I /usr/include/linux
217This contains information which may change from system release to
218system release and used to be a symbolic link to
219.I /usr/src/linux/include/linux
76c637e1 220to get at operating-system-specific information.
fea681da
MK
221
222(Note that one should have include files there that work correctly with
c13182ef
MK
223the current libc and in user space.
224However, Linux kernel source is not
fea681da 225designed to be used with user programs and does not know anything
c13182ef
MK
226about the libc you are using.
227It is very likely that things will break
fea681da
MK
228if you let
229.I /usr/include/asm
230and
231.I /usr/include/linux
c13182ef
MK
232point at a random kernel tree.
233Debian systems don't do this
fea681da
MK
234and use headers from a known good kernel
235version, provided in the libc*-dev package.)
236.TP
237.I /usr/include/g++
238Include files to use with the GNU C++ compiler.
239.TP
240.I /usr/lib
241Object libraries, including dynamic libraries, plus some executables
c13182ef
MK
242which usually are not invoked directly.
243More complicated programs may
fea681da
MK
244have whole subdirectories there.
245.TP
246.I /usr/lib/X11
247The usual place for data files associated with X programs, and
c13182ef
MK
248configuration files for the X system itself.
249On Linux, it usually is
fea681da
MK
250a symbolic link to
251.IR /usr/X11R6/lib/X11 .
252.TP
253.I /usr/lib/gcc-lib
254contains executables and include files for the GNU C compiler,
255.BR gcc (1).
256.TP
257.I /usr/lib/groff
258Files for the GNU groff document formatting system.
259.TP
260.I /usr/lib/uucp
c13182ef 261Files for
fea681da
MK
262.BR uucp (1).
263.TP
264.I /usr/local
265This is where programs which are local to the site typically go.
266.TP
267.I /usr/local/bin
268Binaries for programs local to the site.
269.TP
270.I /usr/local/doc
271Local documentation.
272.TP
273.I /usr/local/etc
274Configuration files associated with locally installed programs.
275.TP
276.I /usr/local/games
277Binaries for locally installed games.
278.TP
279.I /usr/local/lib
280Files associated with locally installed programs.
281.TP
282.I /usr/local/include
283Header files for the local C compiler.
284.TP
285.I /usr/local/info
286Info pages associated with locally installed programs.
287.TP
288.I /usr/local/man
289Man pages associated with locally installed programs.
290.TP
291.I /usr/local/sbin
292Locally installed programs for system administration.
293.TP
294.I /usr/local/share
295Local application data that can be shared among different architectures
296of the same OS.
297.TP
298.I /usr/local/src
299Source code for locally installed software.
300.TP
301.I /usr/man
c13182ef 302Replaced by
fea681da
MK
303.IR /usr/share/man .
304.TP
305.I /usr/sbin
306This directory contains program binaries for system administration
307which are not essential for the boot process, for mounting
308.IR /usr ,
309or for system repair.
310.TP
311.I /usr/share
312This directory contains subdirectories with specific application data, that
313can be shared among different architectures of the same OS.
314Often one finds stuff here that used to live in
315.I /usr/doc
316or
317.I /usr/lib
318or
319.IR /usr/man .
320.TP
321.I /usr/share/dict
322Contains the word lists used by spell checkers.
c13182ef 323.TP
fea681da
MK
324.I /usr/share/doc
325Documentation about installed programs.
326.TP
327.I /usr/share/games
328Static data files for games in
329.IR /usr/games .
330.TP
331.I /usr/share/info
332Info pages go here.
333.TP
334.I /usr/share/locale
335Locale information goes here.
336.TP
337.I /usr/share/man
777f5a9e 338Manual pages go here in subdirectories according to the man page sections.
fea681da 339.TP
8c383102 340.I /usr/share/man/<locale>/man[1\-9]
c13182ef
MK
341These directories contain manual pages for the
342specific locale in source code form.
343Systems which use a unique language and code set for all manual pages
fea681da
MK
344may omit the <locale> substring.
345.TP
346.I /usr/share/misc
347Miscellaneous data that can be shared among different architectures of the
348same OS.
349.TP
350.I /usr/share/nls
351The message catalogs for native language support go here.
352.TP
353.I /usr/share/sgml
354Files for SGML and XML.
355.TP
356.I /usr/share/terminfo
9fdfa163 357The database for terminfo.
fea681da
MK
358.TP
359.I /usr/share/tmac
360Troff macros that are not distributed with groff.
361.TP
362.I /usr/share/zoneinfo
363Files for timezone information.
364.TP
365.I /usr/src
366Source files for different parts of the system, included with some packages
c13182ef
MK
367for reference purposes.
368Don't work here with your own projects, as files
fea681da
MK
369below /usr should be read-only except when installing software.
370.TP
371.I /usr/src/linux
372This was the traditional place for the kernel source.
373Some distributions put here the source for the default kernel they ship.
374You should probably use another directory when building your own kernel.
375.TP
376.I /usr/tmp
c13182ef
MK
377Obsolete.
378This should be a link
fea681da
MK
379to
380.IR /var/tmp .
381This link is present only for compatibility reasons and shouldn't be used.
382.TP
383.I /var
384This directory contains files which may change in size, such as spool
385and log files.
386.TP
387.I /var/adm
388This directory is superseded by
389.I /var/log
390and should be a symbolic link to
391.IR /var/log .
392.TP
393.I /var/backups
394Reserved for historical reasons.
395.TP
396.I /var/cache
397Data cached for programs.
398.TP
8c383102 399.IR /var/catman/cat[1\-9] " or " /var/cache/man/cat[1\-9]
fea681da 400These directories contain preformatted manual pages according to their
c13182ef
MK
401man page section.
402(The use of preformatted manual pages is deprecated.)
fea681da
MK
403.TP
404.I /var/cron
405Reserved for historical reasons.
406.TP
407.I /var/lib
408Variable state information for programs.
409.TP
410.I /var/local
411Variable data for
412.IR /usr/local .
413.TP
414.I /var/lock
c13182ef
MK
415Lock files are placed in this directory.
416The naming convention for
fea681da
MK
417device lock files is
418.I LCK..<device>
419where
420.I <device>
9ee4a2b6 421is the device's name in the filesystem.
75b94dc3 422The format used is that of HDU UUCP lock files, that is, lock files
fea681da
MK
423contain a PID as a 10-byte ASCII decimal number, followed by a newline
424character.
425.TP
426.I /var/log
427Miscellaneous log files.
428.TP
429.I /var/opt
c13182ef 430Variable data for
fea681da
MK
431.IR /opt .
432.TP
433.I /var/mail
c13182ef
MK
434Users' mailboxes.
435Replaces
fea681da
MK
436.IR /var/spool/mail .
437.TP
438.I /var/msgs
439Reserved for historical reasons.
440.TP
441.I /var/preserve
442Reserved for historical reasons.
443.TP
444.I /var/run
445Run-time variable files, like files holding process identifiers (PIDs)
446and logged user information
447.IR (utmp) .
448Files in this directory are usually cleared when the system boots.
449.TP
450.I /var/spool
451Spooled (or queued) files for various programs.
452.TP
453.I /var/spool/at
454Spooled jobs for
455.BR at (1).
456.TP
457.I /var/spool/cron
458Spooled jobs for
49ec013c 459.BR cron (8).
fea681da
MK
460.TP
461.I /var/spool/lpd
462Spooled files for printing.
463.TP
464.I /var/spool/mail
c13182ef 465Replaced by
fea681da
MK
466.IR /var/mail .
467.TP
468.I /var/spool/mqueue
469Queued outgoing mail.
470.TP
471.I /var/spool/news
472Spool directory for news.
473.TP
474.I /var/spool/rwho
c13182ef 475Spooled files for
fea681da
MK
476.BR rwhod (8).
477.TP
478.I /var/spool/smail
479Spooled files for the
480.BR smail (1)
481mail delivery program.
482.TP
483.I /var/spool/uucp
484Spooled files for
485.BR uucp (1).
486.TP
487.I /var/tmp
488Like
489.IR /tmp ,
490this directory holds temporary files stored for an unspecified duration.
491.TP
492.I /var/yp
493Database files for NIS.
47297adb 494.SH CONFORMING TO
43eeac17 495The Filesystem Hierarchy Standard, Version 2.3
608bf950
SK
496.UR http://www.pathname.com\:/fhs/
497.UE .
fea681da
MK
498.SH BUGS
499This list is not exhaustive; different systems may be configured
500differently.
47297adb 501.SH SEE ALSO
fea681da
MK
502.BR find (1),
503.BR ln (1),
de9957dc
MK
504.BR proc (5),
505.BR mount (8)
fea681da
MK
506
507The Filesystem Hierarchy Standard