| 1 |
kmuto |
11647 |
<!-- retain these comments for translator revision tracking -->
|
| 2 |
|
|
<!-- $Id: tree.xml 11568 2004-03-21 12:12:18Z waldi $ -->
|
| 3 |
|
|
|
| 4 |
|
|
|
| 5 |
|
|
<sect1 id="directory-tree">
|
| 6 |
|
|
<title>The Directory Tree</title>
|
| 7 |
|
|
<para>
|
| 8 |
|
|
|
| 9 |
|
|
&debian; adheres to the
|
| 10 |
|
|
<ulink url="&url-fhs-home;">Filesystem Hierarchy Standard</ulink>
|
| 11 |
|
|
for directory and file naming. This standard allows users and software
|
| 12 |
|
|
programs to predict the location of files and directories. The root
|
| 13 |
|
|
level directory is represented simply by the slash
|
| 14 |
|
|
<filename>/</filename>. At the root level, all Debian systems include
|
| 15 |
|
|
these directories:
|
| 16 |
|
|
|
| 17 |
|
|
<informaltable>
|
| 18 |
|
|
<tgroup cols="2">
|
| 19 |
|
|
<thead>
|
| 20 |
|
|
<row>
|
| 21 |
|
|
<entry>Directory</entry><entry>Content</entry>
|
| 22 |
|
|
</row>
|
| 23 |
|
|
</thead>
|
| 24 |
|
|
|
| 25 |
|
|
<tbody>
|
| 26 |
|
|
<row>
|
| 27 |
|
|
<entry><filename>bin</filename></entry>
|
| 28 |
|
|
<entry>Essential command binaries</entry>
|
| 29 |
|
|
</row><row>
|
| 30 |
|
|
<entry><filename>boot</filename></entry>
|
| 31 |
|
|
<entry>Static files of the boot loader</entry>
|
| 32 |
|
|
</row><row>
|
| 33 |
|
|
<entry><filename>dev</filename></entry>
|
| 34 |
|
|
<entry>Device files</entry>
|
| 35 |
|
|
</row><row>
|
| 36 |
|
|
<entry><filename>etc</filename></entry>
|
| 37 |
|
|
<entry>Host-specific system configuration</entry>
|
| 38 |
|
|
</row><row>
|
| 39 |
|
|
<entry><filename>home</filename></entry>
|
| 40 |
|
|
<entry>User home directories</entry>
|
| 41 |
|
|
</row><row>
|
| 42 |
|
|
<entry><filename>lib</filename></entry>
|
| 43 |
|
|
<entry>Essential shared libraries and kernel modules</entry>
|
| 44 |
|
|
</row><row>
|
| 45 |
|
|
<entry><filename>mnt</filename></entry>
|
| 46 |
|
|
<entry>Mount point for mounting a file system temporarily</entry>
|
| 47 |
|
|
</row><row>
|
| 48 |
|
|
<entry><filename>proc</filename></entry>
|
| 49 |
|
|
<entry>Virtual directory for system information</entry>
|
| 50 |
|
|
</row><row>
|
| 51 |
|
|
<entry><filename>root</filename></entry>
|
| 52 |
|
|
<entry>Home directory for the root user</entry>
|
| 53 |
|
|
</row><row>
|
| 54 |
|
|
<entry><filename>sbin</filename></entry>
|
| 55 |
|
|
<entry>Essential system binaries</entry>
|
| 56 |
|
|
</row><row>
|
| 57 |
|
|
<entry><filename>tmp</filename></entry>
|
| 58 |
|
|
<entry>Temporary files</entry>
|
| 59 |
|
|
</row><row>
|
| 60 |
|
|
<entry><filename>usr</filename></entry>
|
| 61 |
|
|
<entry>Secondary hierarchy</entry>
|
| 62 |
|
|
</row><row>
|
| 63 |
|
|
<entry><filename>var</filename></entry>
|
| 64 |
|
|
<entry>Variable data</entry>
|
| 65 |
|
|
</row><row>
|
| 66 |
|
|
<entry><filename>opt</filename></entry>
|
| 67 |
|
|
<entry>Add-on application software packages</entry>
|
| 68 |
|
|
</row>
|
| 69 |
|
|
</tbody></tgroup></informaltable>
|
| 70 |
|
|
</para>
|
| 71 |
|
|
|
| 72 |
|
|
<para>
|
| 73 |
|
|
|
| 74 |
|
|
The following is a list of important considerations regarding
|
| 75 |
|
|
directories and partitions.
|
| 76 |
|
|
|
| 77 |
|
|
</para>
|
| 78 |
|
|
<itemizedlist>
|
| 79 |
|
|
<listitem><para>
|
| 80 |
|
|
|
| 81 |
|
|
The root partition <filename>/</filename> must always physically
|
| 82 |
|
|
contain <filename>/etc</filename>, <filename>/bin</filename>,
|
| 83 |
|
|
<filename>/sbin</filename>, <filename>/lib</filename> and
|
| 84 |
|
|
<filename>/dev</filename>, otherwise you won't be able to boot.
|
| 85 |
|
|
Typically 100 MB is needed for the root partition, but this may vary.
|
| 86 |
|
|
|
| 87 |
|
|
</para></listitem>
|
| 88 |
|
|
<listitem><para>
|
| 89 |
|
|
|
| 90 |
|
|
<filename>/usr</filename>: all user programs
|
| 91 |
|
|
(<filename>/usr/bin</filename>), libraries
|
| 92 |
|
|
(<filename>/usr/lib</filename>), documentation
|
| 93 |
|
|
(<filename>/usr/share/doc</filename>), etc., are in this
|
| 94 |
|
|
directory. This part of the file system needs most of the space. You
|
| 95 |
|
|
should provide at least 500 MB of disk space. If you want to install
|
| 96 |
|
|
more packages you should increase the amount of space you give this
|
| 97 |
|
|
directory.
|
| 98 |
|
|
|
| 99 |
|
|
</para></listitem>
|
| 100 |
|
|
<listitem><para>
|
| 101 |
|
|
|
| 102 |
|
|
<filename>/home</filename>: every user will put his data into a
|
| 103 |
|
|
subdirectory of this directory. The size of this depends on how many
|
| 104 |
|
|
users will be using the system and what files are to be stored in
|
| 105 |
|
|
their directories. Depending on your planned usage you should reserve
|
| 106 |
|
|
about 100 MB for each user, but adapt this value to your needs.
|
| 107 |
|
|
|
| 108 |
|
|
</para></listitem>
|
| 109 |
|
|
<listitem><para>
|
| 110 |
|
|
|
| 111 |
|
|
<filename>/var</filename>: all variable data like news articles,
|
| 112 |
|
|
e-mails, web sites, the packaging system cache, etc. will be placed
|
| 113 |
|
|
under this directory. The size of this directory depends greatly on
|
| 114 |
|
|
the usage of your computer, but for most people will be dictated by
|
| 115 |
|
|
the package management tool's overhead. If you are going to do a full
|
| 116 |
|
|
installation of just about everything Debian has to offer, all in one
|
| 117 |
|
|
session, setting aside 2 or 3 gigabytes of space for
|
| 118 |
|
|
<filename>/var</filename> should be sufficient. If you are going to
|
| 119 |
|
|
install in pieces (that is to say, install services and utilities,
|
| 120 |
|
|
followed by text stuff, then X, ...), you can get away with 300 - 500
|
| 121 |
|
|
megabytes in <filename>/var</filename>. If hard drive space is at a
|
| 122 |
|
|
premium and you don't plan on doing major system updates, you can get
|
| 123 |
|
|
by with as little as 30 or 40 megabytes in <filename>/var</filename>.
|
| 124 |
|
|
|
| 125 |
|
|
</para></listitem>
|
| 126 |
|
|
<listitem><para>
|
| 127 |
|
|
|
| 128 |
|
|
<filename>/tmp</filename>: if a program creates temporary data it will
|
| 129 |
|
|
most likely go in <filename>/tmp</filename>. 20-50 MB should usually
|
| 130 |
|
|
be enough.
|
| 131 |
|
|
|
| 132 |
|
|
</para></listitem>
|
| 133 |
|
|
</itemizedlist>
|
| 134 |
|
|
|
| 135 |
|
|
</sect1>
|