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