Linux 磁盘分区方案

Ubuntu adheres to the Filesystem Hierarchy Standard for directory and file naming. This standard allows users and software programs to predict the location of files and directories. The root level directory is represented simply by the slash /. At the root level, all Ubuntu systems include these directories:
Ubuntu遵循目录和文件命名的文件系统层次结构标准。 该标准允许用户和软件程序预测文件和目录的位置。 根目录仅用斜杠/表示。 从 root 用户的角度来看,所有Ubuntu系统都包含以下目录:

Directory 目录Content 内容
binEssential command binaries
基本的命令二进制文件
bootStatic files of the boot loader
引导加载程序的静态文件
devDevice files
设备文件
etcHost-specific system configuration
特定于主机的系统配置
homeUser home directories
用户主目录
libEssential shared libraries and kernel modules
基本的共享库和内核模块
mediaContains mount points for replaceable media
包含可更换介质的安装点
mntMount point for mounting a file system temporarily
临时挂载文件系统的挂载点
procVirtual directory for system information
系统信息的虚拟目录
rootHome directory for the root user
root 用户的主目录
runRun-time variable data
运行时变量数据
sbinEssential system binaries
基本的系统二进制文件
sysVirtual directory for system information
系统信息的虚拟目录
tmpTemporary files
临时文件
usrSecondary hierarchy
二级层次结构
varVariable data
变量数据
srvData for services provided by the system
系统提供服务的数据
optAdd-on application software packages
附加应用软件包

The following is a list of important considerations regarding directories and partitions. Note that disk usage varies widely given system configuration and specific usage patterns. The recommendations here are general guidelines and provide a starting point for partitioning.
以下是关于目录和分区的一些重要注意事项。注意,根据系统配置和特定的使用模式,磁盘使用情况差异很大。这里的建议是通用的指导原则,并为分区提供了一个起点。

  • The root partition / must always physically contain /etc, /bin, /sbin, /lib and /dev, otherwise you won’t be able to boot. Typically 150–310MB is needed for the root partition.
    根分区/必须总是物理包含/etc, /bin, /sbin, /lib和/dev,否则你将无法启动。通常,根分区需要150-310MB的空间。

  • /usr: contains all user programs (/usr/bin), libraries (/usr/lib), documentation (/usr/share/doc), etc. This is the part of the file system that generally takes up most space. You should provide at least 500MB of disk space. This amount should be increased depending on the number and type of packages you plan to install. A generous server installation should allow 4–6GB.
    /usr:包含所有用户程序(/usr/bin)、库(/usr/lib)、文档(/usr/share/doc)等。这是文件系统中通常占用最多空间的部分。您应该提供至少500MB的磁盘空间。这个数量应该根据您计划安装的包的数量和类型而增加。一个慷慨的服务器安装应该允许4-6GB。

  • It is now recommended to have /usr on the root partition /, otherwise it could cause some trouble at boot time. 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.
    现在建议在根分区/上有/usr,否则在引导时可能会造成一些麻烦。这意味着您应该为根分区(包括/usr)提供至少600-750MB的磁盘空间,或者为工作站或服务器安装提供5-6GB的磁盘空间。

  • /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 Ubuntu 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.
    /var:新闻文章、电子邮件、网站、数据库、包装系统缓存等可变数据将被放置在这个目录下。此目录的大小在很大程度上取决于系统的使用情况,但对于大多数人来说,这将取决于包管理工具的开销。如果你想要完全安装Ubuntu提供的所有功能,在一个会话中,为/var留出2或3 GB的空间就足够了。如果你要安装在块(也就是说,安装服务和公用事业,其次是文本内容,然后X,…),你可以得到300 - 500 MB。如果硬盘空间溢价,你不打算做主要的系统更新,你可以靠30或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.
    /tmp:由程序创建的临时数据很可能在这个目录中。40-100MB通常就足够了。一些应用程序——包括存档操作器、CD/DVD创作工具和多媒体软件——可以使用/tmp临时存储图像文件。如果您计划使用这样的应用程序,您应该相应地调整/tmp中可用的空间。

  • /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.
    /home:每个用户都会把自己的个人数据放入这个目录的子目录中。它的大小取决于有多少用户将使用该系统,以及在他们的目录中存储哪些文件。根据您的计划使用情况,您应该为每个用户保留大约100MB,但是要根据您的需要调整这个值。如果您计划在主目录中保存大量的多媒体文件(图片、MP3、电影),请预留更多的空间。

参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值