OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man7 / hier.7
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 2012-08-05 "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 .TP
55 .I /dev
56 Special or device files, which refer to physical devices.
57 See
58 .BR mknod (1).
59 .TP
60 .I /etc
61 Contains configuration files which are local to the machine.
62 Some
63 larger software packages, like X11, can have their own subdirectories
64 below
65 .IR /etc .
66 Site-wide configuration files may be placed here or in
67 .IR /usr/etc .
68 Nevertheless, programs should always look for these files in
69 .I /etc
70 and you may have links for these files to
71 .IR /usr/etc .
72 .TP
73 .I /etc/opt
74 Host-specific configuration files for add-on applications installed
75 in
76 .IR /opt .
77 .TP
78 .I /etc/sgml
79 This directory contains the configuration files for SGML and XML (optional).
80 .TP
81 .I /etc/skel
82 When a new user account is created, files from this directory are
83 usually copied into the user's home directory.
84 .TP
85 .I /etc/X11
86 Configuration files for the X11 window system (optional).
87 .TP
88 .I /home
89 On machines with home directories for users, these are usually beneath
90 this directory, directly or not.
91 The structure of this directory
92 depends on local administration decisions.
93 .TP
94 .I /lib
95 This directory should hold those shared libraries that are necessary
96 to boot the system and to run the commands in the root filesystem.
97 .TP
98 .I /media
99 This directory contains mount points for removable media such as CD
100 and DVD disks or USB sticks.
101 .TP
102 .I /mnt
103 This directory is a mount point for a temporarily mounted filesystem.
104 In some distributions,
105 .I /mnt
106 contains subdirectories intended to be used as mount points for several
107 temporary filesystems.
108 .TP
109 .I /opt
110 This directory should contain add-on packages that contain static files.
111 .TP
112 .I /proc
113 This is a mount point for the
114 .I proc
115 filesystem, which provides information about running processes and
116 the kernel.
117 This pseudo-filesystem is described in more detail in
118 .BR proc (5).
119 .TP
120 .I /root
121 This directory is usually the home directory for the root user (optional).
122 .TP
123 .I /sbin
124 Like
125 .IR /bin ,
126 this directory holds commands needed to boot the system, but which are
127 usually not executed by normal users.
128 .TP
129 .I /srv
130 This directory contains site-specific data that is served by this system.
131 .TP
132 .I /tmp
133 This directory contains temporary files which may be deleted with no
134 notice, such as by a regular job or at system boot up.
135 .TP
136 .I /usr
137 This directory is usually mounted from a separate partition.
138 It should hold only sharable, read-only data, so that it can be mounted
139 by various machines running Linux.
140 .TP
141 .I /usr/X11R6
142 The X\-Window system, version 11 release 6 (optional).
143 .TP
144 .I /usr/X11R6/bin
145 Binaries which belong to the X\-Window system; often, there is a
146 symbolic link from the more traditional
147 .I /usr/bin/X11
148 to here.
149 .TP
150 .I /usr/X11R6/lib
151 Data files associated with the X\-Window system.
152 .TP
153 .I /usr/X11R6/lib/X11
154 These contain miscellaneous files needed to run X;  Often, there is a
155 symbolic link from
156 .I /usr/lib/X11
157 to this directory.
158 .TP
159 .I /usr/X11R6/include/X11
160 Contains include files needed for compiling programs using the X11
161 window system.
162 Often, there is a symbolic link from
163 .I /usr/include/X11
164 to this directory.
165 .TP
166 .I /usr/bin
167 This is the primary directory for executable programs.
168 Most programs
169 executed by normal users which are not needed for booting or for
170 repairing the system and which are not installed locally should be
171 placed in this directory.
172 .TP
173 .I /usr/bin/X11
174 is the traditional place to look for X11 executables; on Linux, it
175 usually is a symbolic link to
176 .IR /usr/X11R6/bin .
177 .TP
178 .I /usr/dict
179 Replaced by
180 .IR /usr/share/dict .
181 .TP
182 .I /usr/doc
183 Replaced by
184 .IR /usr/share/doc .
185 .TP
186 .I /usr/etc
187 Site-wide configuration files to be shared between several machines
188 may be stored in this directory.
189 However, commands should always
190 reference those files using the
191 .I /etc
192 directory.
193 Links from files in
194 .I /etc
195 should point to the appropriate files in
196 .IR /usr/etc .
197 .TP
198 .I /usr/games
199 Binaries for games and educational programs (optional).
200 .TP
201 .I /usr/include
202 Include files for the C compiler.
203 .TP
204 .I /usr/include/X11
205 Include files for the C compiler and the X\-Window system.
206 This is
207 usually a symbolic link to
208 .IR /usr/X11R6/include/X11 .
209 .TP
210 .I /usr/include/asm
211 Include files which declare some assembler functions.
212 This used to be a
213 symbolic link to
214 .IR /usr/src/linux/include/asm .
215 .TP
216 .I /usr/include/linux
217 This contains information which may change from system release to
218 system release and used to be a symbolic link to
219 .I /usr/src/linux/include/linux
220 to get at operating-system-specific information.
221
222 (Note that one should have include files there that work correctly with
223 the current libc and in user space.
224 However, Linux kernel source is not
225 designed to be used with user programs and does not know anything
226 about the libc you are using.
227 It is very likely that things will break
228 if you let
229 .I /usr/include/asm
230 and
231 .I /usr/include/linux
232 point at a random kernel tree.
233 Debian systems don't do this
234 and use headers from a known good kernel
235 version, provided in the libc*-dev package.)
236 .TP
237 .I /usr/include/g++
238 Include files to use with the GNU C++ compiler.
239 .TP
240 .I /usr/lib
241 Object libraries, including dynamic libraries, plus some executables
242 which usually are not invoked directly.
243 More complicated programs may
244 have whole subdirectories there.
245 .TP
246 .I /usr/lib/X11
247 The usual place for data files associated with X programs, and
248 configuration files for the X system itself.
249 On Linux, it usually is
250 a symbolic link to
251 .IR /usr/X11R6/lib/X11 .
252 .TP
253 .I /usr/lib/gcc-lib
254 contains executables and include files for the GNU C compiler,
255 .BR gcc (1).
256 .TP
257 .I /usr/lib/groff
258 Files for the GNU groff document formatting system.
259 .TP
260 .I /usr/lib/uucp
261 Files for
262 .BR uucp (1).
263 .TP
264 .I /usr/local
265 This is where programs which are local to the site typically go.
266 .TP
267 .I /usr/local/bin
268 Binaries for programs local to the site.
269 .TP
270 .I /usr/local/doc
271 Local documentation.
272 .TP
273 .I /usr/local/etc
274 Configuration files associated with locally installed programs.
275 .TP
276 .I /usr/local/games
277 Binaries for locally installed games.
278 .TP
279 .I /usr/local/lib
280 Files associated with locally installed programs.
281 .TP
282 .I /usr/local/include
283 Header files for the local C compiler.
284 .TP
285 .I /usr/local/info
286 Info pages associated with locally installed programs.
287 .TP
288 .I /usr/local/man
289 Man pages associated with locally installed programs.
290 .TP
291 .I /usr/local/sbin
292 Locally installed programs for system administration.
293 .TP
294 .I /usr/local/share
295 Local application data that can be shared among different architectures
296 of the same OS.
297 .TP
298 .I /usr/local/src
299 Source code for locally installed software.
300 .TP
301 .I /usr/man
302 Replaced by
303 .IR /usr/share/man .
304 .TP
305 .I /usr/sbin
306 This directory contains program binaries for system administration
307 which are not essential for the boot process, for mounting
308 .IR /usr ,
309 or for system repair.
310 .TP
311 .I /usr/share
312 This directory contains subdirectories with specific application data, that
313 can be shared among different architectures of the same OS.
314 Often one finds stuff here that used to live in
315 .I /usr/doc
316 or
317 .I /usr/lib
318 or
319 .IR /usr/man .
320 .TP
321 .I /usr/share/dict
322 Contains the word lists used by spell checkers.
323 .TP
324 .I /usr/share/doc
325 Documentation about installed programs.
326 .TP
327 .I /usr/share/games
328 Static data files for games in
329 .IR /usr/games .
330 .TP
331 .I /usr/share/info
332 Info pages go here.
333 .TP
334 .I /usr/share/locale
335 Locale information goes here.
336 .TP
337 .I /usr/share/man
338 Manual pages go here in subdirectories according to the man page sections.
339 .TP
340 .I /usr/share/man/<locale>/man[1\-9]
341 These directories contain manual pages for the
342 specific locale in source code form.
343 Systems which use a unique language and code set for all manual pages
344 may omit the <locale> substring.
345 .TP
346 .I /usr/share/misc
347 Miscellaneous data that can be shared among different architectures of the
348 same OS.
349 .TP
350 .I /usr/share/nls
351 The message catalogs for native language support go here.
352 .TP
353 .I /usr/share/sgml
354 Files for SGML and XML.
355 .TP
356 .I /usr/share/terminfo
357 The database for terminfo.
358 .TP
359 .I /usr/share/tmac
360 Troff macros that are not distributed with groff.
361 .TP
362 .I /usr/share/zoneinfo
363 Files for timezone information.
364 .TP
365 .I /usr/src
366 Source files for different parts of the system, included with some packages
367 for reference purposes.
368 Don't work here with your own projects, as files
369 below /usr should be read-only except when installing software.
370 .TP
371 .I /usr/src/linux
372 This was the traditional place for the kernel source.
373 Some distributions put here the source for the default kernel they ship.
374 You should probably use another directory when building your own kernel.
375 .TP
376 .I /usr/tmp
377 Obsolete.
378 This should be a link
379 to
380 .IR /var/tmp .
381 This link is present only for compatibility reasons and shouldn't be used.
382 .TP
383 .I /var
384 This directory contains files which may change in size, such as spool
385 and log files.
386 .TP
387 .I /var/adm
388 This directory is superseded by
389 .I /var/log
390 and should be a symbolic link to
391 .IR /var/log .
392 .TP
393 .I /var/backups
394 Reserved for historical reasons.
395 .TP
396 .I /var/cache
397 Data cached for programs.
398 .TP
399 .IR /var/catman/cat[1\-9] " or " /var/cache/man/cat[1\-9]
400 These directories contain preformatted manual pages according to their
401 man page section.
402 (The use of preformatted manual pages is deprecated.)
403 .TP
404 .I /var/cron
405 Reserved for historical reasons.
406 .TP
407 .I /var/lib
408 Variable state information for programs.
409 .TP
410 .I /var/local
411 Variable data for
412 .IR /usr/local .
413 .TP
414 .I /var/lock
415 Lock files are placed in this directory.
416 The naming convention for
417 device lock files is
418 .I LCK..<device>
419 where
420 .I <device>
421 is the device's name in the filesystem.
422 The format used is that of HDU UUCP lock files, that is, lock files
423 contain a PID as a 10-byte ASCII decimal number, followed by a newline
424 character.
425 .TP
426 .I /var/log
427 Miscellaneous log files.
428 .TP
429 .I /var/opt
430 Variable data for
431 .IR /opt .
432 .TP
433 .I /var/mail
434 Users' mailboxes.
435 Replaces
436 .IR /var/spool/mail .
437 .TP
438 .I /var/msgs
439 Reserved for historical reasons.
440 .TP
441 .I /var/preserve
442 Reserved for historical reasons.
443 .TP
444 .I /var/run
445 Run-time variable files, like files holding process identifiers (PIDs)
446 and logged user information
447 .IR (utmp) .
448 Files in this directory are usually cleared when the system boots.
449 .TP
450 .I /var/spool
451 Spooled (or queued) files for various programs.
452 .TP
453 .I /var/spool/at
454 Spooled jobs for
455 .BR at (1).
456 .TP
457 .I /var/spool/cron
458 Spooled jobs for
459 .BR cron (8).
460 .TP
461 .I /var/spool/lpd
462 Spooled files for printing.
463 .TP
464 .I /var/spool/mail
465 Replaced by
466 .IR /var/mail .
467 .TP
468 .I /var/spool/mqueue
469 Queued outgoing mail.
470 .TP
471 .I /var/spool/news
472 Spool directory for news.
473 .TP
474 .I /var/spool/rwho
475 Spooled files for
476 .BR rwhod (8).
477 .TP
478 .I /var/spool/smail
479 Spooled files for the
480 .BR smail (1)
481 mail delivery program.
482 .TP
483 .I /var/spool/uucp
484 Spooled files for
485 .BR uucp (1).
486 .TP
487 .I /var/tmp
488 Like
489 .IR /tmp ,
490 this directory holds temporary files stored for an unspecified duration.
491 .TP
492 .I /var/yp
493 Database files for NIS.
494 .SH CONFORMING TO
495 The Filesystem Hierarchy Standard, Version 2.2
496 .UR http://www.pathname.com\:/fhs/
497 .UE .
498 .SH BUGS
499 This list is not exhaustive; different systems may be configured
500 differently.
501 .SH SEE ALSO
502 .BR find (1),
503 .BR ln (1),
504 .BR proc (5),
505 .BR mount (8)
506
507 The Filesystem Hierarchy Standard
508 .SH COLOPHON
509 This page is part of release 3.68 of the Linux
510 .I man-pages
511 project.
512 A description of the project,
513 information about reporting bugs,
514 and the latest version of this page,
515 can be found at
516 \%http://www.kernel.org/doc/man\-pages/.