Imported upstream version 1.5
[manpages-zh.git] / raw / man7 / hier.7
blob36aad2f968756bbdc287d05fe9eef95311f66b0d
1 .\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one
11 .\" 
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\" 
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\" Modified Sun Jul 25 11:05:58 1993 by Rik Faith (faith@cs.unc.edu)
24 .\" Modified Sat Feb 10 16:18:03 1996 by Urs Thuermann (urs@isnogud.escape.de)
25 .\" Modified Mon Jun 16 20:02:00 1997 by Nicol?s Lichtmaier <nick@debian.org>
26 .\" Modified Mon Feb  6 16:41:00 1999 by Nicol?s Lichtmaier <nick@debian.org>
27 .\" Modified Tue Feb  8 16:46:45 2000 by Chris Pepper <pepper@tgg.com>
28 .\" Modified Fri Sep  7 20:32:45 2001 by Tammy Fox <tfox@redhat.com>
29 .TH HIER 7  2001-09-07 "Linux" "Linux Programmer's Manual"
30 .SH NAME
31 hier \- Description of the file system hierarchy
32 .SH DESCRIPTION
33 A typical Linux system has, among others, the following directories:
34 .TP
35 .I /
36 This is the root directory.  This is where the whole tree starts.
37 .TP
38 .I /bin
39 This directory contains executable programs which are needed in
40 single user mode and to bring the system up or repair it.
41 .TP
42 .I /boot
43 Contains static files for the boot loader.  This directory only holds
44 the files which are needed during the boot process.  The map installer
45 and configuration files should go to
46 .I /sbin
47 and
48 .IR /etc .
49 .TP
50 .I /dev
51 Special or device files, which refer to physical devices.  See
52 mknod(1).
53 .TP
54 .I /dos
55 If both MS\-DOS and Linux are run on one computer, this is a typical
56 place to mount a DOS file system.
57 .TP
58 .I /etc
59 Contains configuration files which are local to the machine.  Some
60 larger software packages, like X11, can have their own subdirectories
61 below
62 .IR /etc .
63 Site-wide configuration files may be placed here or in
64 .IR /usr/etc .
65 Nevertheless, programs should always look for these files in
66 .I /etc
67 and you may have links for these files to
68 .IR /usr/etc .
69 .TP
70 .I /etc/opt
71 Host-specific configuration files for add-on applications installed
72 in 
73 .IR /opt .
74 .TP
75 .I /etc/sgml
76 This directory contains the configuration files for SGML and XML (optional).
77 .TP
78 .I /etc/skel
79 When a new user account is created, files from this directory are
80 usually copied into the user's home directory.
81 .TP
82 .I /etc/X11
83 Configuration files for the X11 window system (optional).
84 .TP
85 .I /home
86 On machines with home directories for users, these are usually beneath
87 this directory, directly or not.  The structure of this directory
88 depends on local administration decisions.
89 .TP
90 .I /lib
91 This directory should hold those shared libraries that are necessary
92 to boot the system and to run the commands in the root filesystem.
93 .TP
94 .I /mnt
95 This directory contains mount points for temporarily mounted filesystems
96 .TP
97 .I /opt
98 This directory should contain add-on packages that contain static files.
99 .TP
100 .I /proc
101 This is a mount point for the
102 .I proc
103 filesystem, which provides information about running processes and
104 the kernel.  This pseudo-file system is described in more detail in
105 .BR proc (5).
107 .I /root
108 This directory is usually the home directory for the root user (optional).
110 .I /sbin
111 Like
112 .IR /bin ,
113 this directory holds commands needed to boot the system, but which are
114 usually not executed by normal users.
116 .I /tmp
117 This directory contains temporary files which may be deleted with no
118 notice, such as by a regular job or at system boot up.
120 .I /usr
121 This directory is usually mounted from a separate partition.  It
122 should hold only sharable, read-only data, so that it can be mounted
123 by various machines running Linux.
125 .I /usr/X11R6
126 The X\-Window system, version 11 release 6 (optional).
128 .I /usr/X11R6/bin
129 Binaries which belong to the X\-Windows system; often, there is a
130 symbolic link from the more traditional
131 .I /usr/bin/X11
132 to here.
134 .I /usr/X11R6/lib
135 Data files associated with the X\-Windows system.
137 .I /usr/X11R6/lib/X11
138 These contain miscellaneous files needed to run X;  Often, there is a
139 symbolic link from 
140 .I /usr/lib/X11
141 to this directory.
143 .I /usr/X11R6/include/X11
144 Contains include files needed for compiling programs using the X11
145 window system.  Often, there is a symbolic link from
146 .I /usr/include/X11
147 to this directory.
149 .I /usr/bin
150 This is the primary directory for executable programs.  Most programs
151 executed by normal users which are not needed for booting or for
152 repairing the system and which are not installed locally should be
153 placed in this directory.
155 .I /usr/bin/X11
156 is the traditional place to look for X11 executables; on Linux, it
157 usually is a symbolic link to
158 .IR /usr/X11R6/bin .
160 .I /usr/dict
161 Replaced by
162 .IR /usr/share/dict .
164 .I /usr/doc
165 Replaced by
166 .IR /usr/share/doc .
168 .I /usr/etc
169 Site-wide configuration files to be shared between several machines
170 may be stored in this directory.  However, commands should always
171 reference those files using the
172 .I /etc
173 directory.  Links from files in
174 .I /etc
175 should point to the appropriate files in
176 .IR /usr/etc .
178 .I /usr/games
179 Binaries for games and educational programs (optional).
181 .I /usr/include
182 Include files for the C compiler.
184 .I /usr/include/X11
185 Include files for the C compiler and the X\-Windows system.  This is
186 usually a symbolic link to
187 .I /usr/X11R6/include/X11.
189 .I /usr/include/asm
190 Include files which declare some assembler functions.  This used to be a
191 symbolic link to
192 .IR /usr/src/linux/include/asm .
194 .I /usr/include/linux
195 This contains information which may change from system release to
196 system release and used to be a symbolic link to
197 .I /usr/src/linux/include/linux
198 to get at operating system specific information.
200 (Note that one should have include files there that work correctly with
201 the current libc and in user space. However, Linux kernel source is not
202 designed to be used with user programs and does not know anything
203 about the libc you are using. It is very likely that things will break
204 if you let
205 .I /usr/include/asm
207 .I /usr/include/linux
208 point at a random kernel tree. Debian systems don't do this
209 and use headers from a known good kernel
210 version, provided in the libc*-dev package.)
212 .I /usr/include/g++
213 Include files to use with the GNU C++ compiler.
215 .I /usr/lib
216 Object libraries, including dynamic libraries, plus some executables
217 which usually are not invoked directly.  More complicated programs may
218 have whole subdirectories there.
220 .I /usr/lib/X11
221 The usual place for data files associated with X programs, and
222 configuration files for the X system itself.  On Linux, it usually is
223 a symbolic link to
224 .IR /usr/X11R6/lib/X11 .
226 .I /usr/lib/gcc-lib
227 contains executables and include files for the GNU C compiler,
228 .BR gcc (1).
230 .I /usr/lib/groff
231 Files for the GNU groff document formatting system.
233 .I /usr/lib/uucp
234 Files for 
235 .BR uucp (1).
237 .I /usr/local
238 This is where programs which are local to the site typically go.
240 .I /usr/local/bin
241 Binaries for programs local to the site.
243 .I /usr/local/doc
244 Local documentation.
246 .I /usr/local/etc
247 Configuration files associated with locally installed programs.
249 .I /usr/local/games
250 Binaries for locally installed games.
252 .I /usr/local/lib
253 Files associated with locally installed programs.
255 .I /usr/local/include
256 Header files for the local C compiler.
258 .I /usr/local/info
259 Info pages associated with locally installed programs.
261 .I /usr/local/man
262 Man pages associated with locally installed programs.
264 .I /usr/local/sbin
265 Locally installed programs for system administration.
267 .I /usr/local/share
268 Local application data that can be shared among different architectures
269 of the same OS.
271 .I /usr/local/src
272 Source code for locally installed software.
274 .I /usr/man
275 Replaced by 
276 .IR /usr/share/man .
278 .I /usr/sbin
279 This directory contains program binaries for system administration
280 which are not essential for the boot process, for mounting
281 .IR /usr ,
282 or for system repair.
284 .I /usr/share
285 This directory contains subdirectories with specific application data, that
286 can be shared among different architectures of the same OS.
287 Often one finds stuff here that used to live in
288 .I /usr/doc
290 .I /usr/lib
292 .IR /usr/man .
294 .I /usr/share/dict
295 Contains the word lists used by spell checkers.
296 .TP 
297 .I /usr/share/doc
298 Documentation about installed programs.
300 .I /usr/share/games
301 Static data files for games in
302 .IR /usr/games .
304 .I /usr/share/info
305 Info pages go here.
307 .I /usr/share/locale
308 Locale information goes here.
310 .I /usr/share/man
311 Manpages go here in subdirectories according to the man page sections.
313 .I /usr/share/man/<locale>/man[1-9]
314 These directories contain manual pages for the specific locale in source code
315 form. Systems which use a unique language and code set for all manual pages 
316 may omit the <locale> substring.
318 .I /usr/share/misc
319 Miscellaneous data that can be shared among different architectures of the
320 same OS.
322 .I /usr/share/nls
323 The message catalogs for native language support go here.
325 .I /usr/share/sgml
326 Files for SGML and XML.
328 .I /usr/share/terminfo
329 The datebase for terminfo.
331 .I /usr/share/tmac
332 Troff macros that are not distributed with groff.
334 .I /usr/share/zoneinfo
335 Files for timezone information.
337 .I /usr/src
338 Source files for different parts of the system, included with some packages
339 for reference purposes. Don't work here with your own projects, as files
340 below /usr should be read-only except when installing software.
342 .I /usr/src/linux
343 This was the traditional place for the kernel source.
344 Some distributions put here the source for the default kernel they ship.
345 You should probably use another directory when building your own kernel.
347 .I /usr/tmp
348 Obsolete. This should be a link
350 .IR /var/tmp .
351 This link is present only for compatibility reasons and shouldn't be used.
353 .I /var
354 This directory contains files which may change in size, such as spool
355 and log files.
357 .I /var/adm
358 This directory is superseded by
359 .I /var/log
360 and should be a symbolic link to
361 .IR /var/log .
363 .I /var/backups
364 Reserved for historical reasons.
366 .I /var/cache
367 Data cached for programs.
369 .IR /var/catman/cat[1-9] " or " /var/cache/man/cat[1-9]
370 These directories contain preformatted manual pages according to their
371 man page section. (The use of preformatted manual pages is deprecated.)
373 .I /var/cron
374 Reserved for historical reasons.
376 .I /var/lib
377 Variable state information for programs.
379 .I /var/local
380 Variable data for
381 .IR /usr/local .
383 .I /var/lock
384 Lock files are placed in this directory.  The naming convention for
385 device lock files is
386 .I LCK..<device>
387 where
388 .I <device>
389 is the device's name in the filesystem.
390 The format used is that of HDU UUCP lock files, i.e. lock files
391 contain a PID as a 10-byte ASCII decimal number, followed by a newline
392 character.
394 .I /var/log
395 Miscellaneous log files.
397 .I /var/opt
398 Variable data for 
399 .IR /opt .
401 .I /var/mail
402 Users' mailboxes. Replaces 
403 .IR /var/spool/mail .
405 .I /var/msgs
406 Reserved for historical reasons.
408 .I /var/preserve
409 Reserved for historical reasons.
411 .I /var/run
412 Run-time variable files, like files holding process identifiers (PIDs)
413 and logged user information
414 .IR (utmp) .
415 Files in this directory are usually cleared when the system boots.
417 .I /var/spool
418 Spooled (or queued) files for various programs.
420 .I /var/spool/at
421 Spooled jobs for
422 .BR at (1).
424 .I /var/spool/cron
425 Spooled jobs for
426 .BR cron (1).
428 .I /var/spool/lpd
429 Spooled files for printing.
431 .I /var/spool/mail
432 Replaced by 
433 .IR /var/mail .
435 .I /var/spool/mqueue
436 Queued outgoing mail.
438 .I /var/spool/news
439 Spool directory for news.
441 .I /var/spool/rwho
442 Spooled files for 
443 .BR rwhod (8).
445 .I /var/spool/smail
446 Spooled files for the
447 .BR smail (1)
448 mail delivery program.
450 .I /var/spool/uucp
451 Spooled files for
452 .BR uucp (1).
454 .I /var/tmp
455 Like
456 .IR /tmp ,
457 this directory holds temporary files stored for an unspecified duration.
459 .I /var/yp
460 Database files for NIS.
461 .SH "CONFORMS TO"
462 The Filesystem Hierarchy Standard, Version 2.2 <http://www.pathname.com/fhs/>
463 .SH BUGS
464 This list is not exhaustive; different systems may be configured
465 differently.
466 .SH "SEE ALSO"
467 .BR find (1),
468 .BR ln (1),
469 .BR mount (1),
470 .BR proc (5),
471 The Filesystem Hierarchy Standard