1hier(7)                Miscellaneous Information Manual                hier(7)
2
3
4

NAME

6       hier - description of the filesystem hierarchy
7

DESCRIPTION

9       A typical Linux system has, among others, the following directories:
10
11       /      This  is  the  root  directory.   This  is  where the whole tree
12              starts.
13
14       /bin   This directory contains executable programs which are needed  in
15              single user mode and to bring the system up or repair it.
16
17       /boot  Contains static files for the boot loader.  This directory holds
18              only the files which are needed during the  boot  process.   The
19              map  installer  and  configuration  files should go to /sbin and
20              /etc.  The operating system kernel (initrd for example) must  be
21              located in either / or /boot.
22
23       /dev   Special  or  device files, which refer to physical devices.  See
24              mknod(1).
25
26       /etc   Contains configuration files which are  local  to  the  machine.
27              Some larger software packages, like X11, can have their own sub‐
28              directories below /etc.  Site-wide configuration  files  may  be
29              placed  here  or in /usr/etc.  Nevertheless, programs should al‐
30              ways look for these files in /etc and you  may  have  links  for
31              these files to /usr/etc.
32
33       /etc/opt
34              Host-specific  configuration  files  for add-on applications in‐
35              stalled in /opt.
36
37       /etc/sgml
38              This directory contains the configuration files  for  SGML  (op‐
39              tional).
40
41       /etc/skel
42              When  a  new  user account is created, files from this directory
43              are usually copied into the user's home directory.
44
45       /etc/X11
46              Configuration files for the X11 window system (optional).
47
48       /etc/xml
49              This directory contains the configuration  files  for  XML  (op‐
50              tional).
51
52       /home  On  machines  with home directories for users, these are usually
53              beneath this directory, directly or not.  The structure of  this
54              directory depends on local administration decisions (optional).
55
56       /lib   This  directory should hold those shared libraries that are nec‐
57              essary to boot the system and to run the commands  in  the  root
58              filesystem.
59
60       /lib<qual>
61              These  directories  are variants of /lib on system which support
62              more than one binary format requiring  separate  libraries  (op‐
63              tional).
64
65       /lib/modules
66              Loadable kernel modules (optional).
67
68       /lost+found
69              This  directory  contains  items  lost in the filesystem.  These
70              items are usually chunks of files mangled as a consequence of  a
71              faulty disk or a system crash.
72
73       /media This directory contains mount points for removable media such as
74              CD and DVD disks or USB sticks.  On systems where more than  one
75              device exists for mounting a certain type of media, mount direc‐
76              tories can be created by appending a digit to the name of  those
77              available above starting with '0', but the unqualified name must
78              also exist.
79
80       /media/floppy[1-9]
81              Floppy drive (optional).
82
83       /media/cdrom[1-9]
84              CD-ROM drive (optional).
85
86       /media/cdrecorder[1-9]
87              CD writer (optional).
88
89       /media/zip[1-9]
90              Zip drive (optional).
91
92       /media/usb[1-9]
93              USB drive (optional).
94
95       /mnt   This directory is  a  mount  point  for  a  temporarily  mounted
96              filesystem.  In some distributions, /mnt contains subdirectories
97              intended to be  used  as  mount  points  for  several  temporary
98              filesystems.
99
100       /opt   This  directory  should  contain  add-on  packages  that contain
101              static files.
102
103       /proc  This is a mount point for the proc  filesystem,  which  provides
104              information  about  running  processes  and  the  kernel.   This
105              pseudo-filesystem is described in more detail in proc(5).
106
107       /root  This directory is usually the home directory for the  root  user
108              (optional).
109
110       /run   This  directory  contains information which describes the system
111              since it was booted.  Once this purpose was served  by  /var/run
112              and programs may continue to use it.
113
114       /sbin  Like /bin, this directory holds commands needed to boot the sys‐
115              tem, but which are usually not executed by normal users.
116
117       /srv   This directory contains site-specific data  that  is  served  by
118              this system.
119
120       /sys   This  is  a mount point for the sysfs filesystem, which provides
121              information about the kernel like /proc, but better  structured,
122              following the formalism of kobject infrastructure.
123
124       /tmp   This  directory  contains  temporary  files which may be deleted
125              with no notice, such as by a regular job or at system boot up.
126
127       /usr   This directory is usually mounted from a separate partition.  It
128              should  hold  only  shareable, read-only data, so that it can be
129              mounted by various machines running Linux.
130
131       /usr/X11R6
132              The X-Window system, version 11 release 6 (present in  FHS  2.3,
133              removed in FHS 3.0).
134
135       /usr/X11R6/bin
136              Binaries  which belong to the X-Window system; often, there is a
137              symbolic link from the more traditional /usr/bin/X11 to here.
138
139       /usr/X11R6/lib
140              Data files associated with the X-Window system.
141
142       /usr/X11R6/lib/X11
143              These contain miscellaneous files needed to run X;  Often, there
144              is a symbolic link from /usr/lib/X11 to this directory.
145
146       /usr/X11R6/include/X11
147              Contains  include  files needed for compiling programs using the
148              X11 window  system.   Often,  there  is  a  symbolic  link  from
149              /usr/include/X11 to this directory.
150
151       /usr/bin
152              This  is  the  primary  directory for executable programs.  Most
153              programs executed by normal users which are not needed for boot‐
154              ing  or for repairing the system and which are not installed lo‐
155              cally should be placed in this directory.
156
157       /usr/bin/mh
158              Commands for the MH mail handling system (optional).
159
160       /usr/bin/X11
161              This is the traditional place to look for  X11  executables;  on
162              Linux, it usually is a symbolic link to /usr/X11R6/bin.
163
164       /usr/dict
165              Replaced by /usr/share/dict.
166
167       /usr/doc
168              Replaced by /usr/share/doc.
169
170       /usr/etc
171              Site-wide  configuration  files to be shared between several ma‐
172              chines may be  stored  in  this  directory.   However,  commands
173              should  always  reference  those files using the /etc directory.
174              Links from files in /etc should point to the  appropriate  files
175              in /usr/etc.
176
177       /usr/games
178              Binaries for games and educational programs (optional).
179
180       /usr/include
181              Include files for the C compiler.
182
183       /usr/include/bsd
184              BSD compatibility include files (optional).
185
186       /usr/include/X11
187              Include  files for the C compiler and the X-Window system.  This
188              is usually a symbolic link to /usr/X11R6/include/X11.
189
190       /usr/include/asm
191              Include files which declare some assembler functions.  This used
192              to be a symbolic link to /usr/src/linux/include/asm.
193
194       /usr/include/linux
195              This  contains  information which may change from system release
196              to  system  release  and  used  to  be  a   symbolic   link   to
197              /usr/src/linux/include/linux to get at operating-system-specific
198              information.
199
200              (Note that one should have include files there  that  work  cor‐
201              rectly  with the current libc and in user space.  However, Linux
202              kernel source is not designed to be used with user programs  and
203              does not know anything about the libc you are using.  It is very
204              likely that things will break if you  let  /usr/include/asm  and
205              /usr/include/linux  point  at a random kernel tree.  Debian sys‐
206              tems don't do this and use headers from a known good kernel ver‐
207              sion, provided in the libc*-dev package.)
208
209       /usr/include/g++
210              Include files to use with the GNU C++ compiler.
211
212       /usr/lib
213              Object  libraries,  including  dynamic libraries, plus some exe‐
214              cutables which usually are not invoked directly.   More  compli‐
215              cated programs may have whole subdirectories there.
216
217       /usr/libexec
218              Directory  contains  binaries for internal use only and they are
219              not meant to be executed directly by users shell or scripts.
220
221       /usr/lib<qual>
222              These directories are variants of /usr/lib on system which  sup‐
223              port  more  than one binary format requiring separate libraries,
224              except that the symbolic link /usr/libqual/X11 is  not  required
225              (optional).
226
227       /usr/lib/X11
228              The  usual  place for data files associated with X programs, and
229              configuration files for the X system itself.  On Linux, it  usu‐
230              ally is a symbolic link to /usr/X11R6/lib/X11.
231
232       /usr/lib/gcc-lib
233              contains  executables  and include files for the GNU C compiler,
234              gcc(1).
235
236       /usr/lib/groff
237              Files for the GNU groff document formatting system.
238
239       /usr/lib/uucp
240              Files for uucp(1).
241
242       /usr/local
243              This is where programs which are local to the site typically go.
244
245       /usr/local/bin
246              Binaries for programs local to the site.
247
248       /usr/local/doc
249              Local documentation.
250
251       /usr/local/etc
252              Configuration files associated with locally installed programs.
253
254       /usr/local/games
255              Binaries for locally installed games.
256
257       /usr/local/lib
258              Files associated with locally installed programs.
259
260       /usr/local/lib<qual>
261              These directories are variants of /usr/local/lib on system which
262              support more than one binary format requiring separate libraries
263              (optional).
264
265       /usr/local/include
266              Header files for the local C compiler.
267
268       /usr/local/info
269              Info pages associated with locally installed programs.
270
271       /usr/local/man
272              Man pages associated with locally installed programs.
273
274       /usr/local/sbin
275              Locally installed programs for system administration.
276
277       /usr/local/share
278              Local application data that can be shared among different archi‐
279              tectures of the same OS.
280
281       /usr/local/src
282              Source code for locally installed software.
283
284       /usr/man
285              Replaced by /usr/share/man.
286
287       /usr/sbin
288              This  directory contains program binaries for system administra‐
289              tion which are not essential for the boot process, for  mounting
290              /usr, or for system repair.
291
292       /usr/share
293              This directory contains subdirectories with specific application
294              data, that can be shared among different  architectures  of  the
295              same  OS.   Often  one  finds  stuff  here  that used to live in
296              /usr/doc or /usr/lib or /usr/man.
297
298       /usr/share/color
299              Contains color management information, like International  Color
300              Consortium (ICC) Color profiles (optional).
301
302       /usr/share/dict
303              Contains the word lists used by spell checkers (optional).
304
305       /usr/share/dict/words
306              List of English words (optional).
307
308       /usr/share/doc
309              Documentation about installed programs (optional).
310
311       /usr/share/games
312              Static data files for games in /usr/games (optional).
313
314       /usr/share/info
315              Info pages go here (optional).
316
317       /usr/share/locale
318              Locale information goes here (optional).
319
320       /usr/share/man
321              Manual pages go here in subdirectories according to the man page
322              sections.
323
324       /usr/share/man/locale/man[1-9]
325              These directories contain manual pages for the  specific  locale
326              in  source  code  form.  Systems which use a unique language and
327              code set for all manual pages may omit the <locale> substring.
328
329       /usr/share/misc
330              Miscellaneous data that can be shared among different  architec‐
331              tures of the same OS.
332
333       /usr/share/nls
334              The  message  catalogs  for native language support go here (op‐
335              tional).
336
337       /usr/share/ppd
338              Postscript Printer Definition (PPD) files (optional).
339
340       /usr/share/sgml
341              Files for SGML (optional).
342
343       /usr/share/sgml/docbook
344              DocBook DTD (optional).
345
346       /usr/share/sgml/tei
347              TEI DTD (optional).
348
349       /usr/share/sgml/html
350              HTML DTD (optional).
351
352       /usr/share/sgml/mathml
353              MathML DTD (optional).
354
355       /usr/share/terminfo
356              The database for terminfo (optional).
357
358       /usr/share/tmac
359              Troff macros that are not distributed with groff (optional).
360
361       /usr/share/xml
362              Files for XML (optional).
363
364       /usr/share/xml/docbook
365              DocBook DTD (optional).
366
367       /usr/share/xml/xhtml
368              XHTML DTD (optional).
369
370       /usr/share/xml/mathml
371              MathML DTD (optional).
372
373       /usr/share/zoneinfo
374              Files for timezone information (optional).
375
376       /usr/src
377              Source files for different parts of the  system,  included  with
378              some packages for reference purposes.  Don't work here with your
379              own projects, as files below /usr  should  be  read-only  except
380              when installing software (optional).
381
382       /usr/src/linux
383              This was the traditional place for the kernel source.  Some dis‐
384              tributions put here the source for the default kernel they ship.
385              You should probably use another directory when building your own
386              kernel.
387
388       /usr/tmp
389              Obsolete.  This should be a link  to  /var/tmp.   This  link  is
390              present only for compatibility reasons and shouldn't be used.
391
392       /var   This  directory contains files which may change in size, such as
393              spool and log files.
394
395       /var/account
396              Process accounting logs (optional).
397
398       /var/adm
399              This directory is superseded by /var/log and should  be  a  sym‐
400              bolic link to /var/log.
401
402       /var/backups
403              Reserved for historical reasons.
404
405       /var/cache
406              Data cached for programs.
407
408       /var/cache/fonts
409              Locally generated fonts (optional).
410
411       /var/cache/man
412              Locally formatted man pages (optional).
413
414       /var/cache/www
415              WWW proxy or cache data (optional).
416
417       /var/cache/<package>
418              Package specific cache data (optional).
419
420       /var/catman/cat[1-9] or /var/cache/man/cat[1-9]
421              These directories contain preformatted manual pages according to
422              their man page section.  (The use of preformatted  manual  pages
423              is deprecated.)
424
425       /var/crash
426              System crash dumps (optional).
427
428       /var/cron
429              Reserved for historical reasons.
430
431       /var/games
432              Variable game data (optional).
433
434       /var/lib
435              Variable state information for programs.
436
437       /var/lib/color
438              Variable  files  containing  color  management  information (op‐
439              tional).
440
441       /var/lib/hwclock
442              State directory for hwclock (optional).
443
444       /var/lib/misc
445              Miscellaneous state data.
446
447       /var/lib/xdm
448              X display manager variable data (optional).
449
450       /var/lib/<editor>
451              Editor backup files and state (optional).
452
453       /var/lib/<name>
454              These directories must be used for  all  distribution  packaging
455              support.
456
457       /var/lib/<package>
458              State data for packages and subsystems (optional).
459
460       /var/lib/<pkgtool>
461              Packaging support files (optional).
462
463       /var/local
464              Variable data for /usr/local.
465
466       /var/lock
467              Lock  files are placed in this directory.  The naming convention
468              for device lock files is LCK..<device> where <device> is the de‐
469              vice's  name  in the filesystem.  The format used is that of HDU
470              UUCP lock files, that is, lock files contain a PID as a  10-byte
471              ASCII decimal number, followed by a newline character.
472
473       /var/log
474              Miscellaneous log files.
475
476       /var/opt
477              Variable data for /opt.
478
479       /var/mail
480              Users' mailboxes.  Replaces /var/spool/mail.
481
482       /var/msgs
483              Reserved for historical reasons.
484
485       /var/preserve
486              Reserved for historical reasons.
487
488       /var/run
489              Run-time  variable files, like files holding process identifiers
490              (PIDs) and logged user information (utmp).  Files in this direc‐
491              tory are usually cleared when the system boots.
492
493       /var/spool
494              Spooled (or queued) files for various programs.
495
496       /var/spool/at
497              Spooled jobs for at(1).
498
499       /var/spool/cron
500              Spooled jobs for cron(8).
501
502       /var/spool/lpd
503              Spooled files for printing (optional).
504
505       /var/spool/lpd/printer
506              Spools for a specific printer (optional).
507
508       /var/spool/mail
509              Replaced by /var/mail.
510
511       /var/spool/mqueue
512              Queued outgoing mail (optional).
513
514       /var/spool/news
515              Spool directory for news (optional).
516
517       /var/spool/rwho
518              Spooled files for rwhod(8) (optional).
519
520       /var/spool/smail
521              Spooled files for the smail(1) mail delivery program.
522
523       /var/spool/uucp
524              Spooled files for uucp(1) (optional).
525
526       /var/tmp
527              Like  /tmp,  this  directory holds temporary files stored for an
528              unspecified duration.
529
530       /var/yp
531              Database files for NIS, formerly known as the Sun  Yellow  Pages
532              (YP).
533

STANDARDS

535       The     Filesystem    Hierarchy    Standard    (FHS),    Version    3.0
536https://refspecs.linuxfoundation.org/fhs.shtml⟩, published  March  19,
537       2015
538

BUGS

540       This list is not exhaustive; different distributions and systems may be
541       configured differently.
542

SEE ALSO

544       find(1), ln(1), proc(5), file-hierarchy(7), mount(8)
545
546       The Filesystem Hierarchy Standard
547
548
549
550Linux man-pages 6.04              2023-04-03                           hier(7)
Impressum