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:
bin |
Essential command binaries |
boot |
Static files of the boot loader |
dev |
Device files |
etc |
Host-specific system configuration |
home |
User home directories |
lib |
Essential shared libraries and kernel modules |
media |
Contains mount points for replaceable media |
mnt |
Mount point for mounting a file system temporarily |
proc |
Virtual directory for system information (2.4 and 2.6 kernels) |
root |
Home directory for the root user |
sbin |
Essential system binaries |
sys |
Virtual directory for system information (2.6 kernels) |
tmp |
Temporary files |
usr |
Secondary hierarchy |
var |
Variable data |
srv |
Data for services provided by the system |
opt |
Add-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–250MB is needed for the root partition. -
/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 standard Ubuntu desktop requires a minimum of 1.5GB here. A generous workstation or server installation should allow 4–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. -
/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.
相关推荐
它的基本用法相当简单:只需在终端中输入`tree`,然后指定想要查看的目录路径,如`tree /path/to/directory`。 `tree`命令的一些关键选项包括: 1. `-a`:显示所有文件,包括以`.`开头的隐藏文件。 2. `-d`:仅列...
下载 3,425 kB,耗时 2秒 (1,303 kB/s) Selecting previously unselected package libencode-locale-perl. (正在读取数据库 ... 系统当前共安装有 213805 个文件和目录。) Preparing to unpack .../libencode-locale...
Overview of the emc2 directory (generated by tree -I .git -d) : * app-defaults:存储系统默认配置文件 * bin:存储用户模式下的二进制文件 * configs:存储配置文件,包括: + 5axis:五轴机器人的配置文件 ...
下载 3,425 kB,耗时 2秒 (1,303 kB/s) Selecting previously unselected package libencode-locale-perl. (正在读取数据库 ... 系统当前共安装有 213805 个文件和目录。) Preparing to unpack .../libencode-locale...
Linux5.10内核是Linux操作系统的核心组成部分,它的版本号5.10.76表明这是一次更新,提供了一系列的改进和修复。在这个特定的压缩包"linux-dovetail-v5.10.76-dovetail3.tar.gz"中,包含的是Xenomai官方针对该内核...
Warning: Use the --scripts parameter to include the scripts. mysqlcc-0.9.4-1.i386.rpm generated [root@yun alien]# ls Alien alien.lsm.in alien.spec debian GPL Makefile mysqlcc_0.9.4-0ubuntu1_i386....
tree /path/to/directory ``` **6. 目录操作:cd、mkdir、rm** - **切换目录:** ```sh cd /path/to/directory ``` - **创建目录:** ```sh mkdir new_directory ``` - **删除目录(非空目录需使用-r选项)...
batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick) 文件搜索 find / -name file1 从 '/' 开始进入根文件系统搜索文件和目录 find ...
#include <libxml/tree.h> int main(int argc, char **argv) { xmlDocPtr doc = NULL; xmlNodePtr root_node = NULL, node = NULL, node1 = NULL; doc = xmlNewDoc(BAD_CAST "1.0"); root_node = xmlNewNode...
开发和调试Linux驱动通常需要熟悉内核API、设备树(Device Tree)、模块化编程以及使用`modprobe`、`insmod`等工具来加载和卸载模块。此外,理解Wireshark等网络分析工具可以帮助开发者在问题排查时查看网络数据包。...
GIT_WORK_TREE=/path/to/working/directory git --work-tree=$GIT_WORK_TREE checkout -f ``` 别忘了将`/path/to/working/directory`替换为你希望的项目工作目录,然后保存并关闭文件。执行: ```bash chmod +x /...
HOST_OS_EXTRA=Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty HOST_BUILD_TYPE=release BUILD_ID=57513AA3 OUT_DIR= ============================================ rootroot@cm-System-Product...
- **安装 Linux 发行版**:如 Ubuntu、Debian 等,这些发行版通常提供了丰富的工具和库文件,适合开发工作。 - **安装必要的开发工具**:如 GCC 编译器、make 工具、交叉编译工具链等。 - **配置网络环境**:确保...