In Linux, how does one partition (mount point )?
First, there is no partition in Linux, and there is only a mount point. The mount point is similar to a partition in windows.
Before planning the mount point and its size, you must first understand the role of the following main directories:
/ (Root directory) |
A mount point is required! If you only want to split a mount point, it is. In theory, this mount point is enough to install the system with 5 Gb. However, if you want to use the mount point for daily use, it is recommended to divide it into 10 ~ 20 GB. |
Swap (Swap space) |
It is equivalent to the virtual memory in windows. If the physical memory is less than 1 GB, the swap space should be 2 times the memory; if the physical memory is more than 2 GB, the swap space is basically not required for daily applications and will only be used during sleep. So it's easy. At any time, 2 GB is enough. |
/Home (Home Directory) |
Files created by yourself are usually stored here, so it is best to separate them into one mount point. In this way, everything in the/home directory will not be affected when the system is reinstalled. The size is generally the maximum available space or the space is evenly allocated with/usr. |
/Usr (Application directory) |
Most of the software is installed here. If you plan to install many software, we recommend that you allocate a partition to it and divide the remaining space with/home. |
/Var (Variable data directory) |
If you want to make some server applications, you can consider assigning a large partition to it. This partition usually contains the data to be changed during system operation. The directory size of the data is usually changed or expanded. Some Contents in the original/var directory are in/usr, but to keep the/usr directory relatively stable, put those directories that need to be changed frequently in/var. |
/Boot (Startup directory) |
The static file used by the bootstrap loader. If your hard disk does not support the LBA mode (not likely), You 'd better mount it. If it is mounted, you 'd better mount it to the first partition of the hard disk. 100M enough |
To sum up, take my computer as an example to allocate GB to Linux. The partition is as follows:
Mount point |
Device |
Description |
/ |
/Dev/sda9 |
20G |
Swap |
/Dev/hda5 |
2G |
/Boot |
/Dev/hda6 |
100 M |
/Home |
/Dev/hda7 |
39 GB |
/Usr |
/Dev/hda8 |
39 GB |
This article permanently updates the link address: