Home  >  Article  >  Operation and Maintenance  >  ubuntu partition scheme

ubuntu partition scheme

(*-*)浩
(*-*)浩Original
2019-06-18 15:20:4750900browse

Commonly used solutions

ubuntu partition scheme

## is divided into 3 areas(recommended learning: Linux video tutorial )
1. Mount point /; primary partition; install system and software; size is 30G; partition format is ext4;
2. Mount point /home; logical partition ; Equivalent to "My Documents"; The size is the rest of the hard disk; The partition format is ext4;
3. swap; Logical partition; Acts as virtual memory; The size is equal to the memory size (I am 2G); The partition format is swap
4. /boot; boot partition; logical partition; size is 200M; partition format is ext4;

Ps: (I installed Ubuntu14.04 version, 100G hard disk partition scheme)

button and - button Used to add and delete partitions, change partition attributes (partition format and mount point)

Because the Linux file system is a tree structure, a software will place many files contained in different directory, so the expansion speed of each directory will be different for different purposes. For example, when the computer is used as a server, since the changed files are usually located in /var, sufficient space should be planned for /var; when the computer is used as a daily desktop application, the usage of /home will increase, so /home To enlarge the space; if a large number of software will be installed on the computer, you may need to increase the space of /usr.

Of course, if you do not separate these spaces independently and use / spaces together, you will have the best space usage efficiency, but this will easily cause system instability or other problems. As mentioned earlier, the root directory of the Linux file system must be mounted. Directories mounted without a specific partition will be placed in the same partition as the root directory.

Absolutely cannot be placed in a directory in a different partition than the root directory:

/bin, /sbin, /lib, /etc, /dev these five directories. It must not be separated from the partition where / is located, because these five directories store necessary tools and data for the system. When the root directory is mounted during the boot process, these tools and data are needed to maintain normal operation. If these five directories are placed in other partitions, the system will not boot normally. Directories above
must not be mounted to other partitions. There is no need to place the directory in a different partition from the root directory:
Such as /cdrom, /mnt, /media, /proc, /run, /sys, /srv, etc. These directories can be placed in other partitions, but there is no need to do so, because the existence of these directories is only needed to maintain operation during operation, and most of them will not take up space. Placing it in other partitions will not benefit the performance of the system. For example, /mnt, /media, and /cdrom only provide a mount point so that physical storage media can be mounted; or, for example, /sys and /proc are actually data on the memory, and all the above data will not occupy the hard disk space at all. . So these directories do not require additional partition storage.
It is mentioned in the FHS recommendation that the smaller the partition where the root directory is located, the more conducive it is to the stability of the system and avoiding other interference; when an error occurs, it will be easier to maintain and correct; and it can improve the performance of the system. . Next, it is best to separate it from the root directory and go to the directories of other partitions:
The so-called "best" means that it is not "necessary" for the stability of the entire operating system. As I said at the beginning, as long as "/" exists, the Linux system will work.
/home /var /usr The three must consider which space must be additionally divided (refer to the role of each partition later). Of course, in terms of system stability, it is best to separate them.

For more Linux-related technical articles, please visit the

Linux Operation and Maintenance Tutorial column to learn!

The above is the detailed content of ubuntu partition scheme. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn