1HIER(7)                    Linux Programmer's Manual                   HIER(7)
2
3
4

NAME

6       hier - Description of the file system 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 only
18              holds the files which are needed during the boot  process.   The
19              map  installer  and  configuration  files should go to /sbin and
20              /etc.
21
22       /dev   Special or device files, which refer to physical  devices.   See
23              mknod(1).
24
25       /dos   If both MS-DOS and Linux are run on one computer, this is a typ‐
26              ical place to mount a DOS file system.
27
28       /etc   Contains configuration files which are  local  to  the  machine.
29              Some larger software packages, like X11, can have their own sub‐
30              directories below /etc.  Site-wide configuration  files  may  be
31              placed  here  or  in  /usr/etc.   Nevertheless,  programs should
32              always look for these files in /etc and you may have  links  for
33              these files to /usr/etc.
34
35       /etc/opt
36              Host-specific   configuration   files  for  add-on  applications
37              installed in /opt.
38
39       /etc/sgml
40              This directory contains the configuration files for SGML and XML
41              (optional).
42
43       /etc/skel
44              When  a  new  user account is created, files from this directory
45              are usually copied into the user's home directory.
46
47       /etc/X11
48              Configuration files for the X11 window system (optional).
49
50       /home  On machines with home directories for users, these  are  usually
51              beneath  this directory, directly or not.  The structure of this
52              directory depends on local administration decisions.
53
54       /lib   This directory should hold those shared libraries that are  nec‐
55              essary  to  boot  the system and to run the commands in the root
56              filesystem.
57
58       /mnt   This directory contains mount  points  for  temporarily  mounted
59              filesystems
60
61       /opt   This  directory  should  contain  add-on  packages  that contain
62              static files.
63
64       /proc  This is a mount point for the proc  filesystem,  which  provides
65              information  about  running  processes  and  the  kernel.   This
66              pseudo-file system is described in more detail in proc(5).
67
68       /root  This directory is usually the home directory for the  root  user
69              (optional).
70
71       /sbin  Like /bin, this directory holds commands needed to boot the sys‐
72              tem, but which are usually not executed by normal users.
73
74       /tmp   This directory contains temporary files  which  may  be  deleted
75              with no notice, such as by a regular job or at system boot up.
76
77       /usr   This directory is usually mounted from a separate partition.  It
78              should hold only sharable, read-only data, so  that  it  can  be
79              mounted by various machines running Linux.
80
81       /usr/X11R6
82              The X-Window system, version 11 release 6 (optional).
83
84       /usr/X11R6/bin
85              Binaries which belong to the X-Windows system; often, there is a
86              symbolic link from the more traditional /usr/bin/X11 to here.
87
88       /usr/X11R6/lib
89              Data files associated with the X-Windows system.
90
91       /usr/X11R6/lib/X11
92              These contain miscellaneous files needed to run X;  Often, there
93              is a symbolic link from /usr/lib/X11 to this directory.
94
95       /usr/X11R6/include/X11
96              Contains  include  files needed for compiling programs using the
97              X11 window  system.   Often,  there  is  a  symbolic  link  from
98              /usr/include/X11 to this directory.
99
100       /usr/bin
101              This  is  the  primary  directory for executable programs.  Most
102              programs executed by normal users which are not needed for boot‐
103              ing  or  for  repairing  the  system and which are not installed
104              locally should be placed in this directory.
105
106       /usr/bin/X11
107              is the traditional place to look for X11 executables; on  Linux,
108              it usually is a symbolic link to /usr/X11R6/bin.
109
110       /usr/dict
111              Replaced by /usr/share/dict.
112
113       /usr/doc
114              Replaced by /usr/share/doc.
115
116       /usr/etc
117              Site-wide  configuration  files  to  be  shared  between several
118              machines may be stored in  this  directory.   However,  commands
119              should  always  reference  those files using the /etc directory.
120              Links from files in /etc should point to the  appropriate  files
121              in /usr/etc.
122
123       /usr/games
124              Binaries for games and educational programs (optional).
125
126       /usr/include
127              Include files for the C compiler.
128
129       /usr/include/X11
130              Include files for the C compiler and the X-Windows system.  This
131              is usually a symbolic link to /usr/X11R6/include/X11.
132
133       /usr/include/asm
134              Include files which declare some assembler functions.  This used
135              to be a symbolic link to /usr/src/linux/include/asm.
136
137       /usr/include/linux
138              This  contains  information which may change from system release
139              to  system  release  and  used  to  be  a   symbolic   link   to
140              /usr/src/linux/include/linux to get at operating system specific
141              information.
142
143              (Note that one should have include files there  that  work  cor‐
144              rectly  with  the current libc and in user space. However, Linux
145              kernel source is not designed to be used with user programs  and
146              does  not know anything about the libc you are using. It is very
147              likely that things will break if you  let  /usr/include/asm  and
148              /usr/include/linux point at a random kernel tree. Debian systems
149              don't do this and use headers from a known good kernel  version,
150              provided in the libc*-dev package.)
151
152       /usr/include/g++
153              Include files to use with the GNU C++ compiler.
154
155       /usr/lib
156              Object  libraries,  including  dynamic libraries, plus some exe‐
157              cutables which usually are not invoked directly.   More  compli‐
158              cated programs may have whole subdirectories there.
159
160       /usr/lib/X11
161              The  usual  place for data files associated with X programs, and
162              configuration files for the X system itself.  On Linux, it  usu‐
163              ally is a symbolic link to /usr/X11R6/lib/X11.
164
165       /usr/lib/gcc-lib
166              contains  executables  and include files for the GNU C compiler,
167              gcc(1).
168
169       /usr/lib/groff
170              Files for the GNU groff document formatting system.
171
172       /usr/lib/uucp
173              Files for uucp(1).
174
175       /usr/local
176              This is where programs which are local to the site typically go.
177
178       /usr/local/bin
179              Binaries for programs local to the site.
180
181       /usr/local/doc
182              Local documentation.
183
184       /usr/local/etc
185              Configuration files associated with locally installed programs.
186
187       /usr/local/games
188              Binaries for locally installed games.
189
190       /usr/local/lib
191              Files associated with locally installed programs.
192
193       /usr/local/include
194              Header files for the local C compiler.
195
196       /usr/local/info
197              Info pages associated with locally installed programs.
198
199       /usr/local/man
200              Man pages associated with locally installed programs.
201
202       /usr/local/sbin
203              Locally installed programs for system administration.
204
205       /usr/local/share
206              Local application data that can be shared among different archi‐
207              tectures of the same OS.
208
209       /usr/local/src
210              Source code for locally installed software.
211
212       /usr/man
213              Replaced by /usr/share/man.
214
215       /usr/sbin
216              This  directory contains program binaries for system administra‐
217              tion which are not essential for the boot process, for  mounting
218              /usr, or for system repair.
219
220       /usr/share
221              This directory contains subdirectories with specific application
222              data, that can be shared among different  architectures  of  the
223              same  OS.   Often  one  finds  stuff  here  that used to live in
224              /usr/doc or /usr/lib or /usr/man.
225
226       /usr/share/dict
227              Contains the word lists used by spell checkers.
228
229       /usr/share/doc
230              Documentation about installed programs.
231
232       /usr/share/games
233              Static data files for games in /usr/games.
234
235       /usr/share/info
236              Info pages go here.
237
238       /usr/share/locale
239              Locale information goes here.
240
241       /usr/share/man
242              Manual pages go here in subdirectories according to the man page
243              sections.
244
245       /usr/share/man/<locale>/man[1-9]
246              These  directories  contain manual pages for the specific locale
247              in source code form. Systems which use  a  unique  language  and
248              code set for all manual pages may omit the <locale> substring.
249
250       /usr/share/misc
251              Miscellaneous  data that can be shared among different architec‐
252              tures of the same OS.
253
254       /usr/share/nls
255              The message catalogs for native language support go here.
256
257       /usr/share/sgml
258              Files for SGML and XML.
259
260       /usr/share/terminfo
261              The database for terminfo.
262
263       /usr/share/tmac
264              Troff macros that are not distributed with groff.
265
266       /usr/share/zoneinfo
267              Files for timezone information.
268
269       /usr/src
270              Source files for different parts of the  system,  included  with
271              some  packages for reference purposes. Don't work here with your
272              own projects, as files below /usr  should  be  read-only  except
273              when installing software.
274
275       /usr/src/linux
276              This was the traditional place for the kernel source.  Some dis‐
277              tributions put here the source for the default kernel they ship.
278              You should probably use another directory when building your own
279              kernel.
280
281       /usr/tmp
282              Obsolete. This should be a  link  to  /var/tmp.   This  link  is
283              present only for compatibility reasons and shouldn't be used.
284
285       /var   This  directory contains files which may change in size, such as
286              spool and log files.
287
288       /var/adm
289              This directory is superseded by /var/log and should  be  a  sym‐
290              bolic link to /var/log.
291
292       /var/backups
293              Reserved for historical reasons.
294
295       /var/cache
296              Data cached for programs.
297
298       /var/catman/cat[1-9] or /var/cache/man/cat[1-9]
299              These directories contain preformatted manual pages according to
300              their man page section. (The use of preformatted manual pages is
301              deprecated.)
302
303       /var/cron
304              Reserved for historical reasons.
305
306       /var/lib
307              Variable state information for programs.
308
309       /var/local
310              Variable data for /usr/local.
311
312       /var/lock
313              Lock  files are placed in this directory.  The naming convention
314              for device lock files is LCK..<device>  where  <device>  is  the
315              device's name in the filesystem.  The format used is that of HDU
316              UUCP lock files, i.e. lock files contain  a  PID  as  a  10-byte
317              ASCII decimal number, followed by a newline character.
318
319       /var/log
320              Miscellaneous log files.
321
322       /var/opt
323              Variable data for /opt.
324
325       /var/mail
326              Users' mailboxes. Replaces /var/spool/mail.
327
328       /var/msgs
329              Reserved for historical reasons.
330
331       /var/preserve
332              Reserved for historical reasons.
333
334       /var/run
335              Run-time  variable files, like files holding process identifiers
336              (PIDs) and logged user information (utmp).  Files in this direc‐
337              tory are usually cleared when the system boots.
338
339       /var/spool
340              Spooled (or queued) files for various programs.
341
342       /var/spool/at
343              Spooled jobs for at(1).
344
345       /var/spool/cron
346              Spooled jobs for cron(1).
347
348       /var/spool/lpd
349              Spooled files for printing.
350
351       /var/spool/mail
352              Replaced by /var/mail.
353
354       /var/spool/mqueue
355              Queued outgoing mail.
356
357       /var/spool/news
358              Spool directory for news.
359
360       /var/spool/rwho
361              Spooled files for rwhod(8).
362
363       /var/spool/smail
364              Spooled files for the smail(1) mail delivery program.
365
366       /var/spool/uucp
367              Spooled files for uucp(1).
368
369       /var/tmp
370              Like  /tmp,  this  directory holds temporary files stored for an
371              unspecified duration.
372
373       /var/yp
374              Database files for NIS.
375

CONFORMING TO

377       The  Filesystem  Hierarchy  Standard,  Version  2.2   <http://www.path
378       name.com/fhs/>
379

BUGS

381       This  list  is not exhaustive; different systems may be configured dif‐
382       ferently.
383

SEE ALSO

385       find(1), ln(1), mount(1), proc(5)
386
387       The Filesystem Hierarchy Standard
388
389
390
391Linux                             2001-09-07                           HIER(7)
Impressum