Debian GNU/Linux 依照 檔案系統層次標準 (Filesystem Hierarchy Standard) 為目錄以及檔案命名。這個標準允許使用者以及軟體程式預測檔案及目錄的位置。根層次目錄只是簡單表現為 /
。在根層次,所有的 Debian 系統包括這些目錄:
目錄 | 內容 |
---|---|
bin |
基礎命令執行檔案 |
boot |
boot loader的靜態鏈結檔案 |
dev |
裝置檔案 |
etc |
主機特定的系統設定 |
home |
使用者家目錄 |
lib |
基本共享程式庫以及核心單元 |
media |
包含移動媒介的掛載點 |
mnt |
暫時掛載檔案系統的掛載點 |
proc |
Virtual directory for system information |
root |
根使用者的家目錄 |
run |
Run-time variable data |
sbin |
基本的系統執行檔案 |
sys |
Virtual directory for system information |
tmp |
暫存檔 |
usr |
第二層次 |
var |
變動資料 |
srv |
Data for services provided by the system |
opt |
附加的應用程式軟體套件 |
下面列出關於目錄和分割區的重要考量。要注意硬碟的使用隨系統設定和特定用途有很大變化。這裡的建議是一般導引,提供分割區的基本分割方式。
The root partition /
must always physically contain /etc
, /bin
, /sbin
, /lib
, /dev
and /usr
, otherwise you won't be able to boot. This means that you should provide at least 600–750MB of disk space for the root partition including /usr
, or 5–6GB for a workstation or a server installation.
/var
: variable data like news articles, e-mails, web sites, databases, the packaging system cache, etc. will be placed under this directory. The size of this directory depends greatly on the usage of your system, but for most people will be dictated by the package management tool's overhead. If you are going to do a full installation of just about everything Debian has to offer, all in one session, setting aside 2 or 3 GB of space for /var
should be sufficient. If you are going to install in pieces (that is to say, install services and utilities, followed by text stuff, then X, ...), you can get away with 300–500 MB. If hard drive space is at a premium and you don't plan on doing major system updates, you can get by with as little as 30 or 40 MB.
/tmp
: temporary data created by programs will most likely go in this directory. 40–100MB should usually be enough. Some applications — including archive manipulators, CD/DVD authoring tools, and multimedia software — may use /tmp
to temporarily store image files. If you plan to use such applications, you should adjust the space available in /tmp
accordingly.
/home
: every user will put his personal data into a subdirectory of this directory. Its size depends on how many users will be using the system and what files are to be stored in their directories. Depending on your planned usage you should reserve about 100MB for each user, but adapt this value to your needs. Reserve a lot more space if you plan to save a lot of multimedia files (pictures, MP3, movies) in your home directory.