hier 中文man頁面
NAME 名稱
hier - 文件系統(tǒng)描述
DESCRIPTION 描述
一個典型的Linux系統(tǒng)具有以下幾個目錄:
- /
- 根目錄,是所有目錄樹開始的地方。
- /bin
- 此目錄下包括了單用戶方式及系統(tǒng)啟動或修復(fù)所用到的所有執(zhí)行程序。
- /boot
- 包括了引導(dǎo)程序的靜態(tài)文件。此目錄下包括了在引導(dǎo)過程中所必需的文件。系統(tǒng)裝載程序及配制文件在 /sbin 和 /etc 目錄中找到。
- /dev
- 對應(yīng)物理設(shè)備的指定文件或驅(qū)動程序。參見mknod(1)。
- /dos
- 如果MS-DOS和Linux共存于一臺計算機(jī)時,這里通常用于存放DOS 文件系統(tǒng)。
- /etc
- 用于存放本地機(jī)的配置文件。一些大型軟件包,如X11,在 /etc 下有它們自己的子目錄。系統(tǒng)配置文件可以放在這里或在 /usr/etc。 不過所有程序總是在 /etc 目錄下查找所需的配置文件,你也可以將這些文件連結(jié)到目錄 /usr/etc.
- /etc/skel
- 當(dāng)建立一個新用戶帳號時,此目錄下的文件通常被復(fù)制到用戶的主目錄下。
- /etc/X11
- X11 window system所需的配置文件。
- /home
- 在Linux機(jī)器上,用戶主目錄通常直接或間接地置在此目錄下。其結(jié)構(gòu)通常由本地機(jī)的管理員來決定。
- /lib
- 此目錄下包含系統(tǒng)引導(dǎo)和在根用戶執(zhí)行命令所必需用到的共享庫。
- /mnt
- 掛載臨時文件系統(tǒng)的掛載點。
- /proc
- 這是提供運行過程和核心文件系統(tǒng) proc 掛載點。這一"偽"文件系統(tǒng)在以下章節(jié)中有詳細(xì)敘述 proc(5)。
- /sbin
- 類似于 /bin 此目錄保存了系統(tǒng)引導(dǎo)所需的命令,但這些命令一般用戶不能執(zhí)行。
- /tmp
- 此目錄用于保存臨時文件,臨時文件在日常維護(hù)或在系統(tǒng)啟動時無需通知便可刪除
- /usr
- 此目錄通常用于從一個獨立的分區(qū)上掛載文件。它應(yīng)保存共享只讀類文件,這樣它可以被運行Linux的不同主機(jī)掛載。
- /usr/X11R6
- X-Window系統(tǒng) Version 11 release 6.
- /usr/X11R6/bin
- X-Windows系統(tǒng)使用的二進(jìn)制文件;通常是在對更傳統(tǒng)的 /usr/bin/X11 中文件的符號連接。
- /usr/X11R6/lib
- 保存與X-Windows系統(tǒng)有關(guān)數(shù)據(jù)文件。
- /usr/X11R6/lib/X11
- 此目錄保存與運行X-Windows系統(tǒng)有關(guān)其他文件。通常是對來自 /usr/lib/X11 中文件的符號連接。
- /usr/X11R6/include/X11
- 此目錄保存包括使用X11視窗系統(tǒng)進(jìn)行編譯程序所需的文件。通常是對來自 /usr/lib/X11 中文件的符號連接。
- /usr/bin
- 這是執(zhí)行程序的主要目錄,其中的絕大多數(shù)為一般用戶使用,除了那些啟動系統(tǒng)或修復(fù)系統(tǒng)或不是本地安裝的程序一般都放在此目錄下。
- /usr/bin/X11
- X11執(zhí)行文件放置的地方;在Linux系統(tǒng)中,它通常是對 /usr/X11R6/bin. 符號連接表
- /usr/dict
- 此目錄保存拼寫檢查器所使用的詞匯表文件。
- /usr/doc
- 此目錄下應(yīng)可以找到那些已安裝的軟件文檔。
- /usr/etc
- 此目錄可用來那些存放整個網(wǎng)共用的配置文件。然而那可執(zhí)行命令指向總是使用參照使用 /etc 目錄下的文件。 /etc 目錄下連接文件應(yīng)指向 /usr/etc. 目錄下適當(dāng)?shù)奈募?
- /usr/include
- C程序語言編譯使用的Include"包括"文件。
- /usr/include/X11
- C程序語言編譯和X-Windows系統(tǒng)使用的 Include"包括"文件。它通常中指向 /usr/X11R6/include/X11. 符號連接表。
- /usr/include/asm
- 申明匯編函數(shù)的Include"包括"文件,它通常是指向 /usr/src/linux/include/asm 目錄的符號連接
- /usr/include/linux
- 包含系統(tǒng)變更的信息通常是指向 /usr/src/linux/include/linux 目錄的符號連接表,來獲得操作系統(tǒng)特定信息。
(注:用戶應(yīng)在此自行包含那些保證自己開發(fā)的程序正常運行所需的libc 函數(shù)庫。不管怎樣,Linux核心系統(tǒng)不是設(shè)計用來執(zhí)行直接運行用戶程序的,它并不知道用戶程序需要使用哪個版本的libc庫 。如果你隨意將 /usr/include/asm 和 /usr/include/linux 指向一個系統(tǒng)內(nèi)核,系統(tǒng)很可能崩潰。Debian系統(tǒng)不這么做。它使用 libc*-dev運行包中提供的內(nèi)核系統(tǒng)標(biāo)識,以保證啟動所有正確的文件。)
- /usr/include/g++
- GNU C++編譯器所使用的Include"包括"文件。
- /usr/lib
- 目標(biāo)庫文件,包括動態(tài)連接庫加上一些通常不是直接調(diào)用的可執(zhí)行文件。一些復(fù)雜的程序可能在此占用整個子目錄。
- /usr/lib/X11
- 存放X系統(tǒng)數(shù)據(jù)文件及系統(tǒng)配置文件的地方。 Linux中通常是指向 /usr/X11R6/lib/X11 目錄的符號連接表。
- /usr/lib/gcc-lib
- GNU C 編譯器所使用的可執(zhí)行文件和"包括"文件。 gcc(1).
- /usr/lib/groff
- GNU groff 文檔格式系統(tǒng)所使用的文件。
- /usr/lib/uucp
- uucp(1) 所使用的文件。
- /usr/lib/zoneinfo
- 有關(guān)時區(qū)信息文件文件。
- /usr/local
- 安裝在本地執(zhí)行程序的地方。
- /usr/local/bin
- 在此地放置本地執(zhí)行程序的二進(jìn)制文件。
- /usr/local/doc
- 放置本地文檔。
- /usr/local/etc
- 安裝在本地程序的配置文件。
- /usr/local/lib
- 安裝在本地程序的庫文件。
- /usr/local/info
- 安裝在本地程序有關(guān)信息文件。
- /usr/local/man
- 安裝在本地程序使用手冊。
- /usr/local/sbin
- 安裝在本地的系統(tǒng)管理程序。
- /usr/local/src
- 安裝在本地程序的源代碼。
- /usr/man
- 手冊頁通常放在此目錄,或相關(guān)子目錄下。
- /usr/man//man[1-9]
- 此目錄在指定的地方以源代碼形式存放手冊頁。系統(tǒng)在所有的手冊頁中使用自己獨特的語言及代碼集,可能會省略 substring 子字串。
- /usr/sbin
- 此目錄保存系統(tǒng)管理程序的二進(jìn)制碼,這些文件不是系統(tǒng)啟動或文件系統(tǒng)掛載 /usr 目錄或修復(fù)系統(tǒng)所必需的。
- /usr/share
- 在此目錄下不同的子目錄中保存了同一個操作系統(tǒng)在不同構(gòu)架下工作時特定應(yīng)用程序的共享資料。用戶可以找到通常放在 /usr/doc 或 /usr/lib 或 /usr/man 目錄下的這些資料。
- /usr/src
- 系統(tǒng)不同組成部份的源文件包括參考資料包。不要將你自己與項目有關(guān)的文件放這里,因為在安裝軟件外,/usr下的文件屬性除通常設(shè)為只讀。
- /usr/src/linux
- 系統(tǒng)內(nèi)核資源通常拆包安裝于此。這是系統(tǒng)中重要的一環(huán),因為 /usr/include/linux 符號連接表指向此目錄。你應(yīng)當(dāng)使用其他目錄來來編譯建立新內(nèi)核。
- /usr/tmp
- 此目錄不再使用了。它應(yīng)指向目錄 /var/tmp。 這個鏈接只是出于系統(tǒng)兼容的目的,一般不再使用。
- /var
- 此目錄下文件的大小可能會改變,如緩沖文件可日志文件。
- /var/adm
- 此目錄為 /var/log 甩替代,通常是指向 /var/log 的符號連接表。
- /var/backups
- 此目錄用來存放重要系統(tǒng)文件的后備文件
- /var/catman/cat[1-9] or /var/cache/man/cat[1-9]
- 此目錄存放根據(jù)手冊分類預(yù)先格式化的參考手冊頁。(這些參考手冊頁是相互獨立的)
- /var/lock
- 此目錄存放鎖定文件。依據(jù)命名習(xí)慣,設(shè)備鎖定文件是 LCKxxxxx xxxxx與在文件系統(tǒng)中該設(shè)備名相同,使用的格式是HDU UUCP鎖定文件,例如包含進(jìn)程標(biāo)識PID的鎖定文件是一個10字節(jié)的ASCII格式的數(shù)字,后面跟一個換行符。
- /var/log
- 各種日志文件。
- /var/preserve
- 這是 vi(1) 存放正在編輯中的文件,以便以后可以恢復(fù)。
- /var/run
- 運行時的變量文件,如存放進(jìn)程標(biāo)識和登錄用戶信息的文件。 (utmp) 此目錄下文件在系統(tǒng)啟動時被自動清除。
- /var/spool
- 各種程序產(chǎn)生的緩沖或排除等待的文件
- /var/spool/at
- at(1) 的作業(yè)存緩區(qū)
- /var/spool/cron
- cron(1) 的作業(yè)存緩區(qū)
- /var/spool/lpd
- 打印緩存文件。
- /var/spool/mail
- 用戶郵箱。
- /var/spool/smail
- 存放 smail(1) 郵件發(fā)送程序的緩沖文件。
- /var/spool/news
- 新聞子系統(tǒng)的緩沖目錄
- /var/spool/uucp
- uucp(1) 的緩沖文件
- /var/tmp
- 類似 /tmp, 此目錄保存未指定持續(xù)時間的臨時文件。
CONFORMS TO 適用于
Linux 文件系統(tǒng),1.2版
BUGS缺陷
這份列表是不詳盡的。因為不同的系統(tǒng)配置是不同。
參見
find(1), ln(1), mount(1), proc(5), Linux 文件系統(tǒng)標(biāo)準(zhǔn)的相關(guān)內(nèi)容。
#p#
NAME
hier - Description of the file system hierarchy
DESCRIPTION
A typical Linux system has, among others, the following directories:
- /
- This is the root directory. This is where the whole tree starts.
- /bin
- This directory contains executable programs which are needed in single user mode and to bring the system up or repair it.
- /boot
- Contains static files for the boot loader. This directory only holds the files which are needed during the boot process. The map installer and configuration files should go to /sbin and /etc.
- /dev
- Special or device files, which refer to physical devices. See mknod(1).
- /dos
- If both MS-DOS and Linux are run on one computer, this is a typical place to mount a DOS file system.
- /etc
- Contains configuration files which are local to the machine. Some larger software packages, like X11, can have their own subdirectories below /etc. Site-wide configuration files may be placed here or in /usr/etc. Nevertheless, programs should always look for these files in /etc and you may have links for these files to /usr/etc.
- /etc/opt
- Host-specific configuration files for add-on applications installed in /opt.
- /etc/sgml
- This directory contains the configuration files for SGML and XML (optional).
- /etc/skel
- When a new user account is created, files from this directory are usually copied into the user's home directory.
- /etc/X11
- Configuration files for the X11 window system (optional).
- /home
- On machines with home directories for users, these are usually beneath this directory, directly or not. The structure of this directory depends on local administration decisions.
- /lib
- This directory should hold those shared libraries that are necessary to boot the system and to run the commands in the root filesystem.
- /mnt
- This directory contains mount points for temporarily mounted filesystems
- /opt
- This directory should contain add-on packages that contain static files.
- /proc
- This is a mount point for the proc filesystem, which provides information about running processes and the kernel. This pseudo-file system is described in more detail in proc(5).
- /root
- This directory is usually the home directory for the root user (optional).
- /sbin
- Like /bin, this directory holds commands needed to boot the system, but which are usually not executed by normal users.
- /tmp
- This directory contains temporary files which may be deleted with no notice, such as by a regular job or at system boot up.
- /usr
- This directory is usually mounted from a separate partition. It should hold only sharable, read-only data, so that it can be mounted by various machines running Linux.
- /usr/X11R6
- The X-Window system, version 11 release 6 (optional).
- /usr/X11R6/bin
- Binaries which belong to the X-Windows system; often, there is a symbolic link from the more traditional /usr/bin/X11 to here.
- /usr/X11R6/lib
- Data files associated with the X-Windows system.
- /usr/X11R6/lib/X11
- These contain miscellaneous files needed to run X; Often, there is a symbolic link from /usr/lib/X11 to this directory.
- /usr/X11R6/include/X11
- Contains include files needed for compiling programs using the X11 window system. Often, there is a symbolic link from /usr/include/X11 to this directory.
- /usr/bin
- This is the primary directory for executable programs. Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this directory.
- /usr/bin/X11
- is the traditional place to look for X11 executables; on Linux, it usually is a symbolic link to /usr/X11R6/bin.
- /usr/dict
- Replaced by /usr/share/dict.
- /usr/doc
- Replaced by /usr/share/doc.
- /usr/etc
- Site-wide configuration files to be shared between several machines may be stored in this directory. However, commands should always reference those files using the /etc directory. Links from files in /etc should point to the appropriate files in /usr/etc.
- /usr/games
- Binaries for games and educational programs (optional).
- /usr/include
- Include files for the C compiler.
- /usr/include/X11
- Include files for the C compiler and the X-Windows system. This is usually a symbolic link to /usr/X11R6/include/X11.
- /usr/include/asm
- Include files which declare some assembler functions. This used to be a symbolic link to /usr/src/linux/include/asm.
- /usr/include/linux
- This contains information which may change from system release to system release and used to be a symbolic link to /usr/src/linux/include/linux to get at operating system specific information.
(Note that one should have include files there that work correctly with the current libc and in user space. However, Linux kernel source is not designed to be used with user programs and does not know anything about the libc you are using. It is very likely that things will break if you let /usr/include/asm and /usr/include/linux point at a random kernel tree. Debian systems don't do this and use headers from a known good kernel version, provided in the libc*-dev package.)
- /usr/include/g++
- Include files to use with the GNU C++ compiler.
- /usr/lib
- Object libraries, including dynamic libraries, plus some executables which usually are not invoked directly. More complicated programs may have whole subdirectories there.
- /usr/lib/X11
- The usual place for data files associated with X programs, and configuration files for the X system itself. On Linux, it usually is a symbolic link to /usr/X11R6/lib/X11.
- /usr/lib/gcc-lib
- contains executables and include files for the GNU C compiler, gcc(1).
- /usr/lib/groff
- Files for the GNU groff document formatting system.
- /usr/lib/uucp
- Files for uucp(1).
- /usr/local
- This is where programs which are local to the site typically go.
- /usr/local/bin
- Binaries for programs local to the site.
- /usr/local/doc
- Local documentation.
- /usr/local/etc
- Configuration files associated with locally installed programs.
- /usr/local/games
- Binaries for locally installed games.
- /usr/local/lib
- Files associated with locally installed programs.
- /usr/local/include
- Header files for the local C compiler.
- /usr/local/info
- Info pages associated with locally installed programs.
- /usr/local/man
- Man pages associated with locally installed programs.
- /usr/local/sbin
- Locally installed programs for system administration.
- /usr/local/share
- Local application data that can be shared among different architectures of the same OS.
- /usr/local/src
- Source code for locally installed software.
- /usr/man
- Replaced by /usr/share/man.
- /usr/sbin
- This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair.
- /usr/share
- This directory contains subdirectories with specific application data, that can be shared among different architectures of the same OS. Often one finds stuff here that used to live in /usr/doc or /usr/lib or /usr/man.
- /usr/share/dict
- Contains the word lists used by spell checkers.
- /usr/share/doc
- Documentation about installed programs.
- /usr/share/games
- Static data files for games in /usr/games.
- /usr/share/info
- Info pages go here.
- /usr/share/locale
- Locale information goes here.
- /usr/share/man
- Manpages go here in subdirectories according to the man page sections.
- /usr/share/man/<locale>/man[1-9]
- These directories contain manual pages for the specific locale in source code form. Systems which use a unique language and code set for all manual pages may omit the <locale> substring.
- /usr/share/misc
- Miscellaneous data that can be shared among different architectures of the same OS.
- /usr/share/nls
- The message catalogs for native language support go here.
- /usr/share/sgml
- Files for SGML and XML.
- /usr/share/terminfo
- The datebase for terminfo.
- /usr/share/tmac
- Troff macros that are not distributed with groff.
- /usr/share/zoneinfo
- Files for timezone information.
- /usr/src
- Source files for different parts of the system, included with some packages for reference purposes. Don't work here with your own projects, as files below /usr should be read-only except when installing software.
- /usr/src/linux
- This was the traditional place for the kernel source. Some distributions put here the source for the default kernel they ship. You should probably use another directory when building your own kernel.
- /usr/tmp
- Obsolete. This should be a link to /var/tmp. This link is present only for compatibility reasons and shouldn't be used.
- /var
- This directory contains files which may change in size, such as spool and log files.
- /var/adm
- This directory is superseded by /var/log and should be a symbolic link to /var/log.
- /var/backups
- Reserved for historical reasons.
- /var/cache
- Data cached for programs.
- /var/catman/cat[1-9] or /var/cache/man/cat[1-9]
- These directories contain preformatted manual pages according to their man page section. (The use of preformatted manual pages is deprecated.)
- /var/cron
- Reserved for historical reasons.
- /var/lib
- Variable state information for programs.
- /var/local
- Variable data for /usr/local.
- /var/lock
- Lock files are placed in this directory. The naming convention for device lock files is LCK..<device> where <device> is the device's name in the filesystem. The format used is that of HDU UUCP lock files, i.e. lock files contain a PID as a 10-byte ASCII decimal number, followed by a newline character.
- /var/log
- Miscellaneous log files.
- /var/opt
- Variable data for /opt.
- /var/mail
- Users' mailboxes. Replaces /var/spool/mail.
- /var/msgs
- Reserved for historical reasons.
- /var/preserve
- Reserved for historical reasons.
- /var/run
- Run-time variable files, like files holding process identifiers (PIDs) and logged user information (utmp). Files in this directory are usually cleared when the system boots.
- /var/spool
- Spooled (or queued) files for various programs.
- /var/spool/at
- Spooled jobs for at(1).
- /var/spool/cron
- Spooled jobs for cron(1).
- /var/spool/lpd
- Spooled files for printing.
- /var/spool/mail
- Replaced by /var/mail.
- /var/spool/mqueue
- Queued outgoing mail.
- /var/spool/news
- Spool directory for news.
- /var/spool/rwho
- Spooled files for rwhod(8).
- /var/spool/smail
- Spooled files for the smail(1) mail delivery program.
- /var/spool/uucp
- Spooled files for uucp(1).
- /var/tmp
- Like /tmp, this directory holds temporary files stored for an unspecified duration.
- /var/yp
- Database files for NIS.
CONFORMS TO
The Filesystem Hierarchy Standard, Version 2.2 <http://www.pathname.com/fhs/>
BUGS
This list is not exhaustive; different systems may be configured differently.
SEE ALSO
find(1), ln(1), mount(1), proc(5), The Filesystem Hierarchy Standard

















