]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man7/hier.7
b7deaefa8ba1a0c53f12ddd01ca6ca23a6bbd810
[thirdparty/man-pages.git] / man7 / hier.7
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
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 2021-03-22 "Linux" "Linux Programmer's Manual"
12 .SH NAME
13 hier \- description of the filesystem hierarchy
14 .SH DESCRIPTION
15 A typical Linux system has, among others, the following directories:
16 .TP
17 .I /
18 This is the root directory.
19 This is where the whole tree starts.
20 .TP
21 .I /bin
22 This directory contains executable programs which are needed in
23 single user mode and to bring the system up or repair it.
24 .TP
25 .I /boot
26 Contains static files for the boot loader.
27 This directory holds only
28 the files which are needed during the boot process.
29 The map installer
30 and configuration files should go to
31 .I /sbin
32 and
33 .IR /etc .
34 The operating system kernel (initrd for example) must be located in either
35 .I /
36 or
37 .IR /boot .
38 .TP
39 .I /dev
40 Special or device files, which refer to physical devices.
41 See
42 .BR mknod (1).
43 .TP
44 .I /etc
45 Contains configuration files which are local to the machine.
46 Some
47 larger software packages, like X11, can have their own subdirectories
48 below
49 .IR /etc .
50 Site-wide configuration files may be placed here or in
51 .IR /usr/etc .
52 Nevertheless, programs should always look for these files in
53 .I /etc
54 and you may have links for these files to
55 .IR /usr/etc .
56 .TP
57 .I /etc/opt
58 Host-specific configuration files for add-on applications installed
59 in
60 .IR /opt .
61 .TP
62 .I /etc/sgml
63 This directory contains the configuration files for SGML (optional).
64 .TP
65 .I /etc/skel
66 When a new user account is created, files from this directory are
67 usually copied into the user's home directory.
68 .TP
69 .I /etc/X11
70 Configuration files for the X11 window system (optional).
71 .TP
72 .I /etc/xml
73 This directory contains the configuration files for XML (optional).
74 .TP
75 .I /home
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).
80 .TP
81 .I /lib
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.
84 .TP
85 .I /lib<qual>
86 These directories are variants of
87 .I /lib
88 on system which support more than one binary format requiring separate
89 libraries (optional).
90 .TP
91 .I /lib/modules
92 Loadable kernel modules (optional).
93 .TP
94 .I /lost+found
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.
98 .TP
99 .I /media
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.
107 .TP
108 .I /media/floppy[1\-9]
109 Floppy drive (optional).
110 .TP
111 .I /media/cdrom[1\-9]
112 CD-ROM drive (optional).
113 .TP
114 .I /media/cdrecorder[1\-9]
115 CD writer (optional).
116 .TP
117 .I /media/zip[1\-9]
118 Zip drive (optional).
119 .TP
120 .I /media/usb[1\-9]
121 USB drive (optional).
122 .TP
123 .I /mnt
124 This directory is a mount point for a temporarily mounted filesystem.
125 In some distributions,
126 .I /mnt
127 contains subdirectories intended to be used as mount points for several
128 temporary filesystems.
129 .TP
130 .I /opt
131 This directory should contain add-on packages that contain static files.
132 .TP
133 .I /proc
134 This is a mount point for the
135 .I proc
136 filesystem, which provides information about running processes and
137 the kernel.
138 This pseudo-filesystem is described in more detail in
139 .BR proc (5).
140 .TP
141 .I /root
142 This directory is usually the home directory for the root user (optional).
143 .TP
144 .I /run
145 This directory contains information which describes the system since it was booted.
146 Once this purpose was served by
147 .IR /var/run
148 and programs may continue to use it.
149 .TP
150 .I /sbin
151 Like
152 .IR /bin ,
153 this directory holds commands needed to boot the system, but which are
154 usually not executed by normal users.
155 .TP
156 .I /srv
157 This directory contains site-specific data that is served by this system.
158 .TP
159 .I /sys
160 This is a mount point for the sysfs filesystem, which provides information
161 about the kernel like
162 .IR /proc ,
163 but better structured, following the formalism of kobject infrastructure.
164 .TP
165 .I /tmp
166 This directory contains temporary files which may be deleted with no
167 notice, such as by a regular job or at system boot up.
168 .TP
169 .I /usr
170 This directory is usually mounted from a separate partition.
171 It should hold only shareable, read-only data, so that it can be mounted
172 by various machines running Linux.
173 .TP
174 .I /usr/X11R6
175 The X\-Window system, version 11 release 6 (present in FHS 2.3, removed
176 in FHS 3.0).
177 .TP
178 .I /usr/X11R6/bin
179 Binaries which belong to the X\-Window system; often, there is a
180 symbolic link from the more traditional
181 .I /usr/bin/X11
182 to here.
183 .TP
184 .I /usr/X11R6/lib
185 Data files associated with the X\-Window system.
186 .TP
187 .I /usr/X11R6/lib/X11
188 These contain miscellaneous files needed to run X; Often, there is a
189 symbolic link from
190 .I /usr/lib/X11
191 to this directory.
192 .TP
193 .I /usr/X11R6/include/X11
194 Contains include files needed for compiling programs using the X11
195 window system.
196 Often, there is a symbolic link from
197 .I /usr/include/X11
198 to this directory.
199 .TP
200 .I /usr/bin
201 This is the primary directory for executable programs.
202 Most programs
203 executed by normal users which are not needed for booting or for
204 repairing the system and which are not installed locally should be
205 placed in this directory.
206 .TP
207 .I /usr/bin/mh
208 Commands for the MH mail handling system (optional).
209 .TP
210 .I /usr/bin/X11
211 This is the traditional place to look for X11 executables; on Linux, it
212 usually is a symbolic link to
213 .IR /usr/X11R6/bin .
214 .TP
215 .I /usr/dict
216 Replaced by
217 .IR /usr/share/dict .
218 .TP
219 .I /usr/doc
220 Replaced by
221 .IR /usr/share/doc .
222 .TP
223 .I /usr/etc
224 Site-wide configuration files to be shared between several machines
225 may be stored in this directory.
226 However, commands should always
227 reference those files using the
228 .I /etc
229 directory.
230 Links from files in
231 .I /etc
232 should point to the appropriate files in
233 .IR /usr/etc .
234 .TP
235 .I /usr/games
236 Binaries for games and educational programs (optional).
237 .TP
238 .I /usr/include
239 Include files for the C compiler.
240 .TP
241 .I /usr/include/bsd
242 BSD compatibility include files (optional).
243 .TP
244 .I /usr/include/X11
245 Include files for the C compiler and the X\-Window system.
246 This is
247 usually a symbolic link to
248 .IR /usr/X11R6/include/X11 .
249 .TP
250 .I /usr/include/asm
251 Include files which declare some assembler functions.
252 This used to be a
253 symbolic link to
254 .IR /usr/src/linux/include/asm .
255 .TP
256 .I /usr/include/linux
257 This contains information which may change from system release to
258 system release and used to be a symbolic link to
259 .I /usr/src/linux/include/linux
260 to get at operating-system-specific information.
261 .IP
262 (Note that one should have include files there that work correctly with
263 the current libc and in user space.
264 However, Linux kernel source is not
265 designed to be used with user programs and does not know anything
266 about the libc you are using.
267 It is very likely that things will break
268 if you let
269 .I /usr/include/asm
270 and
271 .I /usr/include/linux
272 point at a random kernel tree.
273 Debian systems don't do this
274 and use headers from a known good kernel
275 version, provided in the libc*-dev package.)
276 .TP
277 .I /usr/include/g++
278 Include files to use with the GNU C++ compiler.
279 .TP
280 .I /usr/lib
281 Object libraries, including dynamic libraries, plus some executables
282 which usually are not invoked directly.
283 More complicated programs may
284 have whole subdirectories there.
285 .TP
286 .I /usr/libexec
287 Directory contains binaries for internal use only and they are not meant
288 to be executed directly by users shell or scripts.
289 .TP
290 .I /usr/lib<qual>
291 These directories are variants of
292 .I /usr/lib
293 on system which support more than one binary format requiring separate
294 libraries, except that the symbolic link
295 .I /usr/lib<qual>/X11
296 is not required (optional).
297 .TP
298 .I /usr/lib/X11
299 The usual place for data files associated with X programs, and
300 configuration files for the X system itself.
301 On Linux, it usually is
302 a symbolic link to
303 .IR /usr/X11R6/lib/X11 .
304 .TP
305 .I /usr/lib/gcc\-lib
306 contains executables and include files for the GNU C compiler,
307 .BR gcc (1).
308 .TP
309 .I /usr/lib/groff
310 Files for the GNU groff document formatting system.
311 .TP
312 .I /usr/lib/uucp
313 Files for
314 .BR uucp (1).
315 .TP
316 .I /usr/local
317 This is where programs which are local to the site typically go.
318 .TP
319 .I /usr/local/bin
320 Binaries for programs local to the site.
321 .TP
322 .I /usr/local/doc
323 Local documentation.
324 .TP
325 .I /usr/local/etc
326 Configuration files associated with locally installed programs.
327 .TP
328 .I /usr/local/games
329 Binaries for locally installed games.
330 .TP
331 .I /usr/local/lib
332 Files associated with locally installed programs.
333 .TP
334 .I /usr/local/lib<qual>
335 These directories are variants of
336 .I /usr/local/lib
337 on system which support more than one binary format requiring separate
338 libraries (optional).
339 .TP
340 .I /usr/local/include
341 Header files for the local C compiler.
342 .TP
343 .I /usr/local/info
344 Info pages associated with locally installed programs.
345 .TP
346 .I /usr/local/man
347 Man pages associated with locally installed programs.
348 .TP
349 .I /usr/local/sbin
350 Locally installed programs for system administration.
351 .TP
352 .I /usr/local/share
353 Local application data that can be shared among different architectures
354 of the same OS.
355 .TP
356 .I /usr/local/src
357 Source code for locally installed software.
358 .TP
359 .I /usr/man
360 Replaced by
361 .IR /usr/share/man .
362 .TP
363 .I /usr/sbin
364 This directory contains program binaries for system administration
365 which are not essential for the boot process, for mounting
366 .IR /usr ,
367 or for system repair.
368 .TP
369 .I /usr/share
370 This directory contains subdirectories with specific application data, that
371 can be shared among different architectures of the same OS.
372 Often one finds stuff here that used to live in
373 .I /usr/doc
374 or
375 .I /usr/lib
376 or
377 .IR /usr/man .
378 .TP
379 .I /usr/share/color
380 Contains color management information, like International Color Consortium (ICC)
381 Color profiles (optional).
382 .TP
383 .I /usr/share/dict
384 Contains the word lists used by spell checkers (optional).
385 .TP
386 .I /usr/share/dict/words
387 List of English words (optional).
388 .TP
389 .I /usr/share/doc
390 Documentation about installed programs (optional).
391 .TP
392 .I /usr/share/games
393 Static data files for games in
394 .I /usr/games
395 (optional).
396 .TP
397 .I /usr/share/info
398 Info pages go here (optional).
399 .TP
400 .I /usr/share/locale
401 Locale information goes here (optional).
402 .TP
403 .I /usr/share/man
404 Manual pages go here in subdirectories according to the man page sections.
405 .TP
406 .I /usr/share/man/<locale>/man[1\-9]
407 These directories contain manual pages for the
408 specific locale in source code form.
409 Systems which use a unique language and code set for all manual pages
410 may omit the <locale> substring.
411 .TP
412 .I /usr/share/misc
413 Miscellaneous data that can be shared among different architectures of the
414 same OS.
415 .TP
416 .I /usr/share/nls
417 The message catalogs for native language support go here (optional).
418 .TP
419 .I /usr/share/ppd
420 Postscript Printer Definition (PPD) files (optional).
421 .TP
422 .I /usr/share/sgml
423 Files for SGML (optional).
424 .TP
425 .I /usr/share/sgml/docbook
426 DocBook DTD (optional).
427 .TP
428 .I /usr/share/sgml/tei
429 TEI DTD (optional).
430 .TP
431 .I /usr/share/sgml/html
432 HTML DTD (optional).
433 .TP
434 .I /usr/share/sgml/mathtml
435 MathML DTD (optional).
436 .TP
437 .I /usr/share/terminfo
438 The database for terminfo (optional).
439 .TP
440 .I /usr/share/tmac
441 Troff macros that are not distributed with groff (optional).
442 .TP
443 .I /usr/share/xml
444 Files for XML (optional).
445 .TP
446 .I /usr/share/xml/docbook
447 DocBook DTD (optional).
448 .TP
449 .I /usr/share/xml/xhtml
450 XHTML DTD (optional).
451 .TP
452 .I /usr/share/xml/mathml
453 MathML DTD (optional).
454 .TP
455 .I /usr/share/zoneinfo
456 Files for timezone information (optional).
457 .TP
458 .I /usr/src
459 Source files for different parts of the system, included with some packages
460 for reference purposes.
461 Don't work here with your own projects, as files
462 below /usr should be read-only except when installing software (optional).
463 .TP
464 .I /usr/src/linux
465 This was the traditional place for the kernel source.
466 Some distributions put here the source for the default kernel they ship.
467 You should probably use another directory when building your own kernel.
468 .TP
469 .I /usr/tmp
470 Obsolete.
471 This should be a link
472 to
473 .IR /var/tmp .
474 This link is present only for compatibility reasons and shouldn't be used.
475 .TP
476 .I /var
477 This directory contains files which may change in size, such as spool
478 and log files.
479 .TP
480 .I /var/account
481 Process accounting logs (optional).
482 .TP
483 .I /var/adm
484 This directory is superseded by
485 .I /var/log
486 and should be a symbolic link to
487 .IR /var/log .
488 .TP
489 .I /var/backups
490 Reserved for historical reasons.
491 .TP
492 .I /var/cache
493 Data cached for programs.
494 .TP
495 .I /var/cache/fonts
496 Locally generated fonts (optional).
497 .TP
498 .I /var/cache/man
499 Locally formatted man pages (optional).
500 .TP
501 .I /var/cache/www
502 WWW proxy or cache data (optional).
503 .TP
504 .I /var/cache/<package>
505 Package specific cache data (optional).
506 .TP
507 .IR /var/catman/cat[1\-9] " or " /var/cache/man/cat[1\-9]
508 These directories contain preformatted manual pages according to their
509 man page section.
510 (The use of preformatted manual pages is deprecated.)
511 .TP
512 .I /var/crash
513 System crash dumps (optional).
514 .TP
515 .I /var/cron
516 Reserved for historical reasons.
517 .TP
518 .I /var/games
519 Variable game data (optional).
520 .TP
521 .I /var/lib
522 Variable state information for programs.
523 .TP
524 .I /var/lib/color
525 Variable files containing color management information (optional).
526 .TP
527 .I /var/lib/hwclock
528 State directory for hwclock (optional).
529 .TP
530 .I /var/lib/misc
531 Miscellaneous state data.
532 .TP
533 .I /var/lib/xdm
534 X display manager variable data (optional).
535 .TP
536 .I /var/lib/<editor>
537 Editor backup files and state (optional).
538 .TP
539 .I /var/lib/<name>
540 These directories must be used for all distribution packaging support.
541 .TP
542 .I /var/lib/<package>
543 State data for packages and subsystems (optional).
544 .TP
545 .I /var/lib/<pkgtool>
546 Packaging support files (optional).
547 .TP
548 .I /var/local
549 Variable data for
550 .IR /usr/local .
551 .TP
552 .I /var/lock
553 Lock files are placed in this directory.
554 The naming convention for
555 device lock files is
556 .I LCK..<device>
557 where
558 .I <device>
559 is the device's name in the filesystem.
560 The format used is that of HDU UUCP lock files, that is, lock files
561 contain a PID as a 10-byte ASCII decimal number, followed by a newline
562 character.
563 .TP
564 .I /var/log
565 Miscellaneous log files.
566 .TP
567 .I /var/opt
568 Variable data for
569 .IR /opt .
570 .TP
571 .I /var/mail
572 Users' mailboxes.
573 Replaces
574 .IR /var/spool/mail .
575 .TP
576 .I /var/msgs
577 Reserved for historical reasons.
578 .TP
579 .I /var/preserve
580 Reserved for historical reasons.
581 .TP
582 .I /var/run
583 Run-time variable files, like files holding process identifiers (PIDs)
584 and logged user information
585 .IR (utmp) .
586 Files in this directory are usually cleared when the system boots.
587 .TP
588 .I /var/spool
589 Spooled (or queued) files for various programs.
590 .TP
591 .I /var/spool/at
592 Spooled jobs for
593 .BR at (1).
594 .TP
595 .I /var/spool/cron
596 Spooled jobs for
597 .BR cron (8).
598 .TP
599 .I /var/spool/lpd
600 Spooled files for printing (optional).
601 .TP
602 .I /var/spool/lpd/printer
603 Spools for a specific printer (optional).
604 .TP
605 .I /var/spool/mail
606 Replaced by
607 .IR /var/mail .
608 .TP
609 .I /var/spool/mqueue
610 Queued outgoing mail (optional).
611 .TP
612 .I /var/spool/news
613 Spool directory for news (optional).
614 .TP
615 .I /var/spool/rwho
616 Spooled files for
617 .BR rwhod (8)
618 (optional).
619 .TP
620 .I /var/spool/smail
621 Spooled files for the
622 .BR smail (1)
623 mail delivery program.
624 .TP
625 .I /var/spool/uucp
626 Spooled files for
627 .BR uucp (1)
628 (optional).
629 .TP
630 .I /var/tmp
631 Like
632 .IR /tmp ,
633 this directory holds temporary files stored for an unspecified duration.
634 .TP
635 .I /var/yp
636 Database files for NIS,
637 formerly known as the Sun Yellow Pages (YP).
638 .SH CONFORMING TO
639 The Filesystem Hierarchy Standard (FHS), Version 3.0, published March 19, 2015
640 .UR https://refspecs.linuxfoundation.org/fhs.shtml
641 .UE .
642 .SH BUGS
643 This list is not exhaustive; different distributions and systems may be configured
644 differently.
645 .SH SEE ALSO
646 .BR find (1),
647 .BR ln (1),
648 .BR proc (5),
649 .BR file\-hierarchy (7),
650 .BR mount (8)
651 .PP
652 The Filesystem Hierarchy Standard