HIER(7) Linux Programmer’s Manual HIER(7)
名前
hier - ファイルシステム階層の説明
説明
典 型的な Linux system には以下のようなディレクトリがある (他にもたくさ
んのディレクトリがあるが):
/ ルートディレクトリ。ここが階層の起点となる。
/bin このディレクトリには、シングルユーザーモードでシステムの起動や修
理を行う際に必要な実行形式ファイルが含まれる。
/boot ブートローダが用いる静的なファイルが含まれている。このディレクト
リにはブートプロセスの間に必要なファイルだけが置かれる。マップイ
ンストーラや設定ファイルは /sbin や /etc に置くべきである。
/dev 物理デバイスを参照しているスペシャルファイルやデバイスファイルの
置き場所。 mknod(1) を参照のこと。
/etc マシン固有の設定ファイルが置かれる場所。X11 のような大規模なソフ
トウェアパッケージでは、 /etc 以下に更にパッケージ単位でサブディ
レクトリが作られることもある。サイト全体に有効な設定ファイルは、
ここではなく /usr/etc に置かれることもある。しかし、プログラムか
らのこれらのファイルの参照先は、常に /etc にす べ き で あ る 。
/usr/etc 以下のファイルに対しては、それらへのリンクを /etc に置
けばよい。
/etc/opt
/opt にインストールされたアドオンアプリケーションが使う、ホス ト
固有の設定ファイルの置き場所。
/etc/sgml
SGML や XML の設定ファイルの置き場所 (なくてもよい)。
/etc/skel
新たにユーザーアカウントを作る際、通常このディレクトリにあるファ
イルがユーザーのホームディレクトリにコピーされる。
/etc/X11
X11 window system の設定ファイルの置き場所 (なくてもよい)。
/home 通常、ユーザーのホームディレクトリが、このディレクトリ直下ないし
サブディレクトリの下に作成される。このディレクトリの構成をどうす
るかは、ローカルマシンの管理者が決めることである。
/lib このディレクトリには、システムの起動時に必要な共有ライブラリや、
ルートファイルシステムでコマンドを実行するのに必要な共有ライブラ
リを置く。
/media このディレクトリには、 CD/DVD ディスクや USB スティックなどの 取
り 外し可能メディア (removable media) 用のマウントポイントが置か
れる。
/mnt このディレクトリは、一時的にマウントするファイルシステム用のマウ
ントポイントである。ディストリビューションによっては、一時的にマ
ウントするファイルシステム用のマウントポイントとして、 /mnt 内に
サブディレクトリが用意されている場合がある。
/opt このディレクトリにはアドオンパッケージの静的なファイルが置かれる
。
/proc このディレクトリは proc ファイルシステムのマウントポイントである
。 proc ファイルシステムは、実行中プロセスやカーネルの情報を提供
する。この疑似ファイルシステムの詳細は、 proc(5) で説明されて い
る。
/root 通常ここが root ユーザのホームディレクトリになる (なくてもよい)
。
/sbin /bin と同様に、このディレクトリにはシステムの起動に必要なコマ ン
ドが含まれる。ただしここには、一般ユーザーは通常実行しないコマン
ドが置かれる。
/tmp このディレクトリには、定期的なジョブによって、またはシステム起動
時に、無条件に削除して構わない一時的なファイルが置かれる。
/usr 通常このディレクトリは、独立したパーティションがマウントされる。
ここには、共有可能で読み込み専用のものだけが含まれ、よっていろい
ろな Linux マシンからマウントできる。
/usr/X11R6
X Window System, Version 11 release 6 (なくてもよい)。
/usr/X11R6/bin
X Window System のバイナリの置き場所。古いディレクトリである
/usr/bin/X11 からここにシンボリックリンクが張られていることが 多
い。
/usr/X11R6/lib
X Window System に関連するデータファイルの置き場所。
/usr/X11R6/lib/X11
こ こ に は X の 動 作 に必要な種々のファイルが含まれている。
/usr/lib/X11 からここにシンボリックリンクが張られていることが 多
い。
/usr/X11R6/include/X11
こ こには X11 Window System を使ったプログラムをコンパイルするた
めに必要なインクルードファイルが含まれている。 /usr/include/X11
からここにシンボリックリンクが張られていることが多い。
/usr/bin
このディレクトリは、実行形式ファイルの主な置き場所である。システ
ムのブートやシステム復旧には必要とされない、一般ユーザーが利用す
るコマンドの多くは、ローカルにインストールされるのでない限り、こ
のディレクトリに置くべきである。
/usr/bin/X11
X11 コマンドの伝統的な置き場所。Linux では、通常 /usr/X11R6/bin
にシンボリックリンクが張られている。
/usr/dict
/usr/share/dict に置き換えられた。
/usr/doc
/usr/share/doc に置き換えられた。
/usr/etc
サイト内部の複数のマシンが共有するような設定ファイルが置かれる。
しかしながら、コマンドはそれらのファイルの参照先を、常に /etc に
すべきだろう。 /etc のファイルからリンクを張って、 /usr/etc の適
切なファイルを指すようにすべきである。
/usr/games
ゲームプログラムや教育用プログラムのバイナリが含まれている (なく
てもよい)。
/usr/include
C コンパイラ用のインクルードファイルが含まれている。
/usr/include/X11
C コンパイラと X Window System 用のインクルードファイルが含まれ
ている。通常これは /usr/inlcude/X11 へのシンボリックリンクになっ
ている。
/usr/include/asm
アセンブラ関数の宣言を行うインクルードファイルが含まれている。こ
のディレクトリは、以前は /usr/src/linux/include/asm へのシンボリ
ックリンクだった。
/usr/include/linux
ここには、システムのリリースのたびごとに変更されうる情報が含まれ
る。ここは以前は /usr/src/linux/include/linux にシンボリックリン
クされており、オペレーティングシステム固有の情報が得られるように
なっていた。
(ここに置くインクルードファイルは、現在の libc およびユーザ空 間
で 正しく動作するものでなければならない。しかし Linux のカーネル
ソースはユーザプログラムといっしょに使うようには設計されていない
し 、 あなたが使っている libc も関知しない。 /usr/include/asm と
/usr/include/linux を適当なカーネルツリーへのリンクにしたりす る
と 、 破 綻 す る の は 目 に 見えている。 Debian ではこうせずに
、libc*-dev package が提供する、安定したカーネルバージョンのヘッ
ダファイルを置いている。)
/usr/include/g++
GNU C++ コンパイラ用のインクルードファイルが含まれている。
/usr/lib
オブジェクトライブラリ (ダイナミックライブラリも含む) と、直接に
は起動されないような実行形式ファイル少々とが置かれる。複雑なプロ
グラムでは、更にサブディレクトリがあるかもしれない。
/usr/lib/X11
X のプログラムに関連するデータファイルと、 X Window System の設
定ファイルの置き場所。 Linux では通常 /usr/X11R6/lib/X11 にシ ン
ボリックリンクが張られている。
/usr/lib/gcc-lib
GNU C コンパイラ gcc(1) 用の実行形式ファイルとインクルードファイ
ルが含まれている。
/usr/lib/groff
GNU groff 文書整形システムのためのファイルが含まれている。
/usr/lib/uucp
uucp(1) のためのファイルが含まれている。
/usr/local
このディレクトリは、サイトローカルなプログラムがインストールされ
る典型的な場所である。
/usr/local/bin
サイトローカルなプログラムが含まれている。
/usr/local/doc
サイトローカルなドキュメントが含まれている。
/usr/local/etc
サイトローカルにインストールされたプログラムの設定ファイルの置き
場所。
/usr/local/games
サイトローカルにインストールされたゲームのバイナリの置き場所。
/usr/local/lib
サイトローカルにインストールされたプログラムの関連ファイルの置き
場所。
/usr/local/include
ローカルな C コンパイラのヘッダファイルの置き場所。
/usr/local/info
サイトローカルにインストールされたプログラムの info ページの置き
場所。
/usr/local/man
サイトローカルにインストールされたプログラムのマニュアルページの
置き場所。
/usr/local/sbin
サイトローカルにインストールされたシステム管理コマンドの置き場所
。
/usr/local/share
同じ OS ならアーキテクチャが異なっても共有できる、ローカルなアプ
リケーションデータの置き場所。
/usr/local/src
サイトローカルにインストールされたソフトウェアのソースコードの置
き場所。
/usr/man
/usr/share/man に置き換えられた。
/usr/sbin
このディレクトリには、システム管理コマンドが含まれる。ここに置か
れるコマンドは、ブートプロセスや /usr のマウント、システムの修理
などに必要なものであってはならない。
/usr/share
このディレクトリには、アプリケーションごとに固有なデータ ( 同 じ
OS ならアーキテクチャが違っていても共有できるもの) がサブディレ
クトリ単位で置かれる。以前には /usr/doc, /usr/lib, /usr/man など
にあった内容が、多くここに置かれている。
/usr/share/dict
スペルチェッカ用の単語リストが含まれる。
/usr/share/doc
インストールされたプログラムのドキュメントの置き場所。
/usr/share/games
/usr/games に置かれたゲーム用の静的なデータファイルの置き場所。
/usr/share/info
info ページが置かれる。
/usr/share/locale
ロケール (locale) 情報が置かれる。
/usr/share/man
マニュアルページ。各ページはセクションに応じたサブディレクトリに
置かれる。
/usr/share/man/
HIER(7) Linux Programmer’s Manual HIER(7)
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).
/etc Contains configuration files which are local to the machine.
Some larger software packages, like X11, can have their own sub-
directories 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 nec-
essary to boot the system and to run the commands in the root
file system.
/media This directory contains mount points for removable media such as
CD and DVD disks or USB sticks.
/mnt This directory is a mount point for a temporarily mounted file
system. In some distributions, /mnt contains subdirectories
intended to be used as mount points for several temporary file
systems.
/opt This directory should contain add-on packages that contain
static files.
/proc This is a mount point for the proc file system, 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 sys-
tem, but which are usually not executed by normal users.
/srv This directory contains site-specific data that is served by
this system.
/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-Window 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-Window 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 boot-
ing 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-Window 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 cor-
rectly 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 sys-
tems don’t do this and use headers from a known good kernel ver-
sion, 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 exe-
cutables which usually are not invoked directly. More compli-
cated 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 usu-
ally 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 archi-
tectures 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 administra-
tion 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
Manual pages go here in subdirectories according to the man page
sections.
/usr/share/man/
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa