1HIER(7)                    Linux Programmer's 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
30              always 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
35              installed in /opt.
36
37       /etc/sgml
38              This  directory  contains  the  configuration  files  for   SGML
39              (optional).
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
50              (optional).
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
63              (optional).
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       /sbin  Like /bin, this directory holds commands needed to boot the sys‐
111              tem, but which are usually not executed by normal users.
112
113       /srv   This directory contains site-specific data  that  is  served  by
114              this system.
115
116       /sys   This  is  a mount point for the sysfs filesystem, which provides
117              information about the kernel like /proc, but better  structured,
118              following the formalism of kobject infrastructure.
119
120       /tmp   This  directory  contains  temporary  files which may be deleted
121              with no notice, such as by a regular job or at system boot up.
122
123       /usr   This directory is usually mounted from a separate partition.  It
124              should  hold  only  shareable, read-only data, so that it can be
125              mounted by various machines running Linux.
126
127       /usr/X11R6
128              The X-Window system, version 11 release 6 (optional).
129
130       /usr/X11R6/bin
131              Binaries which belong to the X-Window system; often, there is  a
132              symbolic link from the more traditional /usr/bin/X11 to here.
133
134       /usr/X11R6/lib
135              Data files associated with the X-Window system.
136
137       /usr/X11R6/lib/X11
138              These contain miscellaneous files needed to run X;  Often, there
139              is a symbolic link from /usr/lib/X11 to this directory.
140
141       /usr/X11R6/include/X11
142              Contains include files needed for compiling programs  using  the
143              X11  window  system.   Often,  there  is  a  symbolic  link from
144              /usr/include/X11 to this directory.
145
146       /usr/bin
147              This is the primary directory  for  executable  programs.   Most
148              programs executed by normal users which are not needed for boot‐
149              ing or for repairing the system  and  which  are  not  installed
150              locally should be placed in this directory.
151
152       /usr/bin/mh
153              Commands for the MH mail handling system (optional).
154
155       /usr/bin/X11
156              is  the traditional place to look for X11 executables; on Linux,
157              it usually is a symbolic link to /usr/X11R6/bin.
158
159       /usr/dict
160              Replaced by /usr/share/dict.
161
162       /usr/doc
163              Replaced by /usr/share/doc.
164
165       /usr/etc
166              Site-wide configuration  files  to  be  shared  between  several
167              machines  may  be  stored  in this directory.  However, commands
168              should always reference those files using  the  /etc  directory.
169              Links  from  files in /etc should point to the appropriate files
170              in /usr/etc.
171
172       /usr/games
173              Binaries for games and educational programs (optional).
174
175       /usr/include
176              Include files for the C compiler.
177
178       /usr/include/bsd
179              BSD compatibility include files (optional).
180
181       /usr/include/X11
182              Include files for the C compiler and the X-Window system.   This
183              is usually a symbolic link to /usr/X11R6/include/X11.
184
185       /usr/include/asm
186              Include files which declare some assembler functions.  This used
187              to be a symbolic link to /usr/src/linux/include/asm.
188
189       /usr/include/linux
190              This contains information which may change from  system  release
191              to   system   release   and  used  to  be  a  symbolic  link  to
192              /usr/src/linux/include/linux to get at operating-system-specific
193              information.
194
195              (Note  that  one  should have include files there that work cor‐
196              rectly with the current libc and in user space.  However,  Linux
197              kernel  source is not designed to be used with user programs and
198              does not know anything about the libc you are using.  It is very
199              likely  that  things  will break if you let /usr/include/asm and
200              /usr/include/linux point at a random kernel tree.   Debian  sys‐
201              tems don't do this and use headers from a known good kernel ver‐
202              sion, provided in the libc*-dev package.)
203
204       /usr/include/g++
205              Include files to use with the GNU C++ compiler.
206
207       /usr/lib
208              Object libraries, including dynamic libraries,  plus  some  exe‐
209              cutables  which  usually are not invoked directly.  More compli‐
210              cated programs may have whole subdirectories there.
211
212       /usr/lib<qual>
213              These directories are variants of /usr/lib on system which  sup‐
214              port  more  than one binary format requiring separate libraries,
215              except that the symbolic link /usr/lib<qual>/X11 is not required
216              (optional).
217
218       /usr/lib/X11
219              The  usual  place for data files associated with X programs, and
220              configuration files for the X system itself.  On Linux, it  usu‐
221              ally is a symbolic link to /usr/X11R6/lib/X11.
222
223       /usr/lib/gcc-lib
224              contains  executables  and include files for the GNU C compiler,
225              gcc(1).
226
227       /usr/lib/groff
228              Files for the GNU groff document formatting system.
229
230       /usr/lib/uucp
231              Files for uucp(1).
232
233       /usr/local
234              This is where programs which are local to the site typically go.
235
236       /usr/local/bin
237              Binaries for programs local to the site.
238
239       /usr/local/doc
240              Local documentation.
241
242       /usr/local/etc
243              Configuration files associated with locally installed programs.
244
245       /usr/local/games
246              Binaries for locally installed games.
247
248       /usr/local/lib
249              Files associated with locally installed programs.
250
251       /usr/local/lib<qual>
252              These directories are variants of /usr/local/lib on system which
253              support more than one binary format requiring separate libraries
254              (optional).
255
256       /usr/local/include
257              Header files for the local C compiler.
258
259       /usr/local/info
260              Info pages associated with locally installed programs.
261
262       /usr/local/man
263              Man pages associated with locally installed programs.
264
265       /usr/local/sbin
266              Locally installed programs for system administration.
267
268       /usr/local/share
269              Local application data that can be shared among different archi‐
270              tectures of the same OS.
271
272       /usr/local/src
273              Source code for locally installed software.
274
275       /usr/man
276              Replaced by /usr/share/man.
277
278       /usr/sbin
279              This  directory contains program binaries for system administra‐
280              tion which are not essential for the boot process, for  mounting
281              /usr, or for system repair.
282
283       /usr/share
284              This directory contains subdirectories with specific application
285              data, that can be shared among different  architectures  of  the
286              same  OS.   Often  one  finds  stuff  here  that used to live in
287              /usr/doc or /usr/lib or /usr/man.
288
289       /usr/share/dict
290              Contains the word lists used by spell checkers (optional).
291
292       /usr/share/dict/words
293              List of English words (optional).
294
295       /usr/share/doc
296              Documentation about installed programs (optional).
297
298       /usr/share/games
299              Static data files for games in /usr/games (optional).
300
301       /usr/share/info
302              Info pages go here (optional).
303
304       /usr/share/locale
305              Locale information goes here (optional).
306
307       /usr/share/man
308              Manual pages go here in subdirectories according to the man page
309              sections.
310
311       /usr/share/man/<locale>/man[1-9]
312              These  directories  contain manual pages for the specific locale
313              in source code form.  Systems which use a  unique  language  and
314              code set for all manual pages may omit the <locale> substring.
315
316       /usr/share/misc
317              Miscellaneous  data that can be shared among different architec‐
318              tures of the same OS.
319
320       /usr/share/nls
321              The  message  catalogs  for  native  language  support  go  here
322              (optional).
323
324       /usr/share/sgml
325              Files for SGML (optional).
326
327       /usr/share/sgml/docbook
328              DocBook DTD (optional).
329
330       /usr/share/sgml/tei
331              TEI DTD (optional).
332
333       /usr/share/sgml/html
334              HTML DTD (optional).
335
336       /usr/share/sgml/mathtml
337              MathML DTD (optional).
338
339       /usr/share/terminfo
340              The database for terminfo (optional).
341
342       /usr/share/tmac
343              Troff macros that are not distributed with groff (optional).
344
345       /usr/share/xml
346              Files for XML (optional).
347
348       /usr/share/xml/docbook
349              DocBook DTD (optional).
350
351       /usr/share/xml/xhtml
352              XHTML DTD (optional).
353
354       /usr/share/xml/mathml
355              MathML DTD (optional).
356
357       /usr/share/zoneinfo
358              Files for timezone information (optional).
359
360       /usr/src
361              Source  files  for  different parts of the system, included with
362              some packages for reference purposes.  Don't work here with your
363              own  projects,  as  files  below /usr should be read-only except
364              when installing software (optional).
365
366       /usr/src/linux
367              This was the traditional place for the kernel source.  Some dis‐
368              tributions put here the source for the default kernel they ship.
369              You should probably use another directory when building your own
370              kernel.
371
372       /usr/tmp
373              Obsolete.   This  should  be  a  link to /var/tmp.  This link is
374              present only for compatibility reasons and shouldn't be used.
375
376       /var   This directory contains files which may change in size, such  as
377              spool and log files.
378
379       /var/account
380              Process accounting logs (optional).
381
382       /var/adm
383              This  directory  is  superseded by /var/log and should be a sym‐
384              bolic link to /var/log.
385
386       /var/backups
387              Reserved for historical reasons.
388
389       /var/cache
390              Data cached for programs.
391
392       /var/cache/fonts
393              Locally-generated fonts (optional).
394
395       /var/cache/man
396              Locally-formatted man pages (optional).
397
398       /var/cache/www
399              WWW proxy or cache data (optional).
400
401       /var/cache/<package>
402              Package specific cache data (optional).
403
404       /var/catman/cat[1-9] or /var/cache/man/cat[1-9]
405              These directories contain preformatted manual pages according to
406              their  man  page section.  (The use of preformatted manual pages
407              is deprecated.)
408
409       /var/crash
410              System crash dumps (optional).
411
412       /var/cron
413              Reserved for historical reasons.
414
415       /var/games
416              Variable game data (optional).
417
418       /var/lib
419              Variable state information for programs.
420
421       /var/lib/hwclock
422              State directory for hwclock (optional).
423
424       /var/lib/misc
425              Miscellaneous state data.
426
427       /var/lib/xdm
428              X display manager variable data (optional).
429
430       /var/lib/<editor>
431              Editor backup files and state (optional).
432
433       /var/lib/<name>
434              These directories must be used for  all  distribution  packaging
435              support.
436
437       /var/lib/<package>
438              State data for packages and subsystems (optional).
439
440       /var/lib/<pkgtool>
441              Packaging support files (optional).
442
443       /var/local
444              Variable data for /usr/local.
445
446       /var/lock
447              Lock  files are placed in this directory.  The naming convention
448              for device lock files is LCK..<device>  where  <device>  is  the
449              device's name in the filesystem.  The format used is that of HDU
450              UUCP lock files, that is, lock files contain a PID as a  10-byte
451              ASCII decimal number, followed by a newline character.
452
453       /var/log
454              Miscellaneous log files.
455
456       /var/opt
457              Variable data for /opt.
458
459       /var/mail
460              Users' mailboxes.  Replaces /var/spool/mail.
461
462       /var/msgs
463              Reserved for historical reasons.
464
465       /var/preserve
466              Reserved for historical reasons.
467
468       /var/run
469              Run-time  variable files, like files holding process identifiers
470              (PIDs) and logged user information (utmp).  Files in this direc‐
471              tory are usually cleared when the system boots.
472
473       /var/spool
474              Spooled (or queued) files for various programs.
475
476       /var/spool/at
477              Spooled jobs for at(1).
478
479       /var/spool/cron
480              Spooled jobs for cron(8).
481
482       /var/spool/lpd
483              Spooled files for printing (optional).
484
485       /var/spool/lpd/printer
486              Spools for a specific printer (optional).
487
488       /var/spool/mail
489              Replaced by /var/mail.
490
491       /var/spool/mqueue
492              Queued outgoing mail (optional).
493
494       /var/spool/news
495              Spool directory for news (optional).
496
497       /var/spool/rwho
498              Spooled files for rwhod(8) (optional).
499
500       /var/spool/smail
501              Spooled files for the smail(1) mail delivery program.
502
503       /var/spool/uucp
504              Spooled files for uucp(1) (optional).
505
506       /var/tmp
507              Like  /tmp,  this  directory holds temporary files stored for an
508              unspecified duration.
509
510       /var/yp
511              Database files for NIS, formerly known as the Sun  Yellow  Pages
512              (YP).
513

CONFORMING TO

515       The Filesystem Hierarchy Standard, Version 2.3 ⟨http://www.pathname.com
516       /fhs/⟩.
517

BUGS

519       This list is not exhaustive; different systems may be  configured  dif‐
520       ferently.
521

SEE ALSO

523       find(1), ln(1), proc(5), file-hierarchy(7), mount(8)
524
525       The Filesystem Hierarchy Standard
526

COLOPHON

528       This  page  is  part of release 4.15 of the Linux man-pages project.  A
529       description of the project, information about reporting bugs,  and  the
530       latest     version     of     this    page,    can    be    found    at
531       https://www.kernel.org/doc/man-pages/.
532
533
534
535Linux                             2017-11-26                           HIER(7)
Impressum