Debian Codegraph @

upstream/debian-unstable/man7/hier.7

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