2004_filesystem_hierarchy_standard.pdf

(498 KB) Pobierz
115268853 UNPDF
Filesystem Hierarchy Standard
Filesystem Hierarchy Standard Group
Edited by
Rusty Russell
Daniel Quinlan
Christopher Yeoh
Filesystem Hierarchy Standard
by Filesystem Hierarchy Standard Group
Edited by Rusty Russell, Daniel Quinlan, and Christopher Yeoh
Published January 28 2004
Copyright © 1994-2004 Daniel Quinlan
Copyright © 2001-2004 Paul ’Rusty’ Russell
Copyright © 2003-2004 Christopher Yeoh
This standard consists of a set of requirements and guidelines for file and directory placement under UNIX-like
operating systems. The guidelines are intended to support interoperability of applications, system administration
tools, development tools, and scripts as well as greater uniformity of documentation for these systems.
All trademarks and copyrights are owned by their owners, unless specifically noted otherwise. Use of a term in this document should not be
regarded as affecting the validity of any trademark or service mark.
Permission is granted to make and distribute verbatim copies of this standard provided the copyright and this permission notice are preserved
on all copies.
Permission is granted to copy and distribute modified versions of this standard under the conditions for verbatim copying, provided also that
the title page is labeled as modified including a reference to the original standard, provided that information on retrieving the original
standard is included, and provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this
one.
Permission is granted to copy and distribute translations of this standard into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a translation approved by the copyright holder.
Table of Contents
1. Introduction........................................................................................................................................................ 1
1.1. Purpose .................................................................................................................................................... 1
1.2. Conventions ............................................................................................................................................. 1
2. The Filesystem .................................................................................................................................................... 2
3. The Root Filesystem........................................................................................................................................... 3
3.1. Purpose .................................................................................................................................................... 3
3.2. Requirements........................................................................................................................................... 4
3.3. Specific Options ...................................................................................................................................... 4
3.4. /bin : Essential user command binaries (for use by all users) ................................................................. 4
3.4.1. Purpose ....................................................................................................................................... 4
3.4.2. Requirements .............................................................................................................................. 5
3.4.3. Specific Options.......................................................................................................................... 6
3.5. /boot : Static files of the boot loader ....................................................................................................... 6
3.5.1. Purpose ....................................................................................................................................... 6
3.5.2. Specific Options.......................................................................................................................... 7
3.6. /dev : Device files .................................................................................................................................... 7
3.6.1. Purpose ....................................................................................................................................... 7
3.6.2. Specific Options.......................................................................................................................... 7
3.7. /etc : Host-specific system configuration ................................................................................................ 7
3.7.1. Purpose ....................................................................................................................................... 7
3.7.2. Requirements .............................................................................................................................. 7
3.7.3. Specific Options.......................................................................................................................... 7
3.7.4. /etc/opt : Configuration files for /opt .......................................................................................... 8
3.7.4.1. Purpose........................................................................................................................... 9
3.7.4.2. Requirements ................................................................................................................. 9
3.7.5. /etc/X11 : Configuration for the X Window System (optional).................................................. 9
3.7.5.1. Purpose........................................................................................................................... 9
3.7.5.2. Specific Options ............................................................................................................. 9
3.7.6. /etc/sgml : Configuration files for SGML (optional) .................................................................. 9
3.7.6.1. Purpose......................................................................................................................... 10
3.7.7. /etc/xml : Configuration files for XML (optional) .................................................................... 10
3.7.7.1. Purpose......................................................................................................................... 10
3.8. /home : User home directories (optional).............................................................................................. 10
3.8.1. Purpose ..................................................................................................................................... 10
3.8.2. Requirements ............................................................................................................................ 10
3.9. /lib : Essential shared libraries and kernel modules .............................................................................. 10
3.9.1. Purpose ..................................................................................................................................... 10
3.9.2. Requirements ............................................................................................................................ 10
3.9.3. Specific Options........................................................................................................................ 11
3.10. /lib<qual> : Alternate format essential shared libraries (optional) ..................................................... 11
3.10.1. Purpose ................................................................................................................................... 11
3.10.2. Requirements .......................................................................................................................... 11
3.11. /media : Mount point for removeable media ....................................................................................... 11
3.11.1. Purpose ................................................................................................................................... 11
3.11.2. Specific Options...................................................................................................................... 12
3.12. /mnt : Mount point for a temporarily mounted filesystem .................................................................. 12
3.12.1. Purpose ................................................................................................................................... 12
3.13. /opt : Add-on application software packages ...................................................................................... 12
3.13.1. Purpose ................................................................................................................................... 12
iii
3.13.2. Requirements .......................................................................................................................... 12
3.14. /root : Home directory for the root user (optional).............................................................................. 13
3.14.1. Purpose ................................................................................................................................... 14
3.15. /sbin : System binaries......................................................................................................................... 14
3.15.1. Purpose ................................................................................................................................... 14
3.15.2. Requirements .......................................................................................................................... 14
3.15.3. Specific Options...................................................................................................................... 14
3.16. /srv : Data for services provided by this system.................................................................................. 15
3.16.1. Purpose ................................................................................................................................... 15
3.17. /tmp : Temporary files ......................................................................................................................... 15
3.17.1. Purpose ................................................................................................................................... 15
4. The /usr Hierarchy........................................................................................................................................... 18
4.1. Purpose .................................................................................................................................................. 18
4.2. Requirements......................................................................................................................................... 18
4.3. Specific Options .................................................................................................................................... 18
4.4. /usr/X11R6 : X Window System, Version 11 Release 6 (optional)....................................................... 18
4.4.1. Purpose ..................................................................................................................................... 19
4.4.2. Specific Options........................................................................................................................ 19
4.5. /usr/bin : Most user commands ............................................................................................................. 19
4.5.1. Purpose ..................................................................................................................................... 19
4.5.2. Specific Options........................................................................................................................ 19
4.6. /usr/include : Directory for standard include files. ................................................................................ 20
4.6.1. Purpose ..................................................................................................................................... 20
4.6.2. Specific Options........................................................................................................................ 20
4.7. /usr/lib : Libraries for programming and packages ............................................................................... 20
4.7.1. Purpose ..................................................................................................................................... 20
4.7.2. Specific Options........................................................................................................................ 20
4.8. /usr/lib<qual> : Alternate format libraries (optional)............................................................................ 21
4.8.1. Purpose ..................................................................................................................................... 21
4.8.2. /usr/local : Local hierarchy ....................................................................................................... 21
4.8.2.1. Purpose......................................................................................................................... 21
4.8.2.2. Requirements ............................................................................................................... 21
4.8.2.3. Specific Options ........................................................................................................... 21
4.9. /usr/local/share ...................................................................................................................................... 22
4.10. /usr/sbin : Non-essential standard system binaries.............................................................................. 22
4.10.1. Purpose ................................................................................................................................... 22
4.11. /usr/share : Architecture-independent data.......................................................................................... 22
4.11.1. Purpose ................................................................................................................................... 22
4.11.2. Requirements .......................................................................................................................... 22
4.11.3. Specific Options...................................................................................................................... 23
4.11.4. /usr/share/dict : Word lists (optional)...................................................................................... 23
4.11.4.1. Purpose....................................................................................................................... 23
4.11.4.2. Specific Options ......................................................................................................... 23
4.11.5. /usr/share/man : Manual pages ............................................................................................... 24
4.11.5.1. Purpose....................................................................................................................... 24
4.11.5.2. Specific Options ......................................................................................................... 25
4.11.6. /usr/share/misc : Miscellaneous architecture-independent data ............................................. 26
4.11.6.1. Specific Options ......................................................................................................... 26
4.11.7. /usr/share/sgml : SGML data (optional) ................................................................................. 27
4.11.7.1. Purpose....................................................................................................................... 27
4.11.7.2. Specific Options ......................................................................................................... 27
iv
4.11.8. /usr/share/xml : XML data (optional) ..................................................................................... 27
4.11.8.1. Purpose....................................................................................................................... 27
4.11.8.2. Specific Options ......................................................................................................... 27
4.12. /usr/src : Source code (optional).......................................................................................................... 28
4.12.1. Purpose ................................................................................................................................... 28
5. The /var Hierarchy........................................................................................................................................... 30
5.1. Purpose .................................................................................................................................................. 30
5.2. Requirements......................................................................................................................................... 30
5.3. Specific Options .................................................................................................................................... 30
5.4. /var/account : Process accounting logs (optional) ................................................................................. 31
5.4.1. Purpose ..................................................................................................................................... 31
5.5. /var/cache : Application cache data....................................................................................................... 31
5.5.1. Purpose ..................................................................................................................................... 31
5.5.2. Specific Options........................................................................................................................ 31
5.5.3. /var/cache/fonts : Locally-generated fonts (optional) ............................................................... 32
5.5.3.1. Purpose......................................................................................................................... 32
5.5.3.2. Specific Options ........................................................................................................... 32
5.5.4. /var/cache/man : Locally-formatted manual pages (optional) .................................................. 32
5.5.4.1. Purpose......................................................................................................................... 32
5.6. /var/crash : System crash dumps (optional) .......................................................................................... 33
5.6.1. Purpose ..................................................................................................................................... 33
5.7. /var/games : Variable game data (optional) ........................................................................................... 33
5.7.1. Purpose ..................................................................................................................................... 33
5.8. /var/lib : Variable state information....................................................................................................... 33
5.8.1. Purpose ..................................................................................................................................... 33
5.8.2. Requirements ............................................................................................................................ 34
5.8.3. Specific Options........................................................................................................................ 34
5.8.4. /var/lib/<editor> : Editor backup files and state (optional)....................................................... 34
5.8.4.1. Purpose......................................................................................................................... 34
5.8.5. /var/lib/hwclock : State directory for hwclock (optional)......................................................... 35
5.8.5.1. Purpose......................................................................................................................... 35
5.8.6. /var/lib/misc : Miscellaneous variable data............................................................................... 35
5.8.6.1. Purpose......................................................................................................................... 35
5.9. /var/lock : Lock files.............................................................................................................................. 35
5.9.1. Purpose ..................................................................................................................................... 35
5.10. /var/log : Log files and directories....................................................................................................... 35
5.10.1. Purpose ................................................................................................................................... 36
5.10.2. Specific Options...................................................................................................................... 36
5.11. /var/mail : User mailbox files (optional) ............................................................................................. 36
5.11.1. Purpose ................................................................................................................................... 36
5.12. /var/opt : Variable data for /opt............................................................................................................ 36
5.12.1. Purpose ................................................................................................................................... 36
5.13. /var/run : Run-time variable data......................................................................................................... 37
5.13.1. Purpose ................................................................................................................................... 37
5.13.2. Requirements .......................................................................................................................... 37
5.14. /var/spool : Application spool data...................................................................................................... 37
5.14.1. Purpose ................................................................................................................................... 37
5.14.2. Specific Options...................................................................................................................... 37
5.14.3. /var/spool/lpd : Line-printer daemon print queues (optional)................................................. 38
5.14.3.1. Purpose....................................................................................................................... 38
5.14.3.2. Specific Options ......................................................................................................... 38
v
Zgłoś jeśli naruszono regulamin