Talking about the partition problem of Linux system

  
                  

Many of the biggest problems faced when installing Linux systems are partitioning problems. Because of the different Linux partition structure and windows, many people feel very uncomfortable with Linux partitions. Want to study Linux system partitions must first look at how the windows system manages partitions.

In the windows system, the operating system is installed into a partition, and then the other partitions and the operating system partition are level, the folder can be created on the partition, in general, the partition contains the folder. Partitions are divided into system partitions and non-system partitions. Usually our c drive is generally a system partition, while other disks are non-system partitions.

The partition management of the Linux system is very different from the windows we usually use. First, the partitions and folders under the Linux system are not in the upper and lower level relationship, and then the system partition is no longer flat with other partitions. Level relationship. In fact, the system partition is a bit reluctant, usually called the root partition under Linux, that is, the Linux system only allows to have a unique /, and the other partitions have two cases:

I think Linux Partitioning two other partitions, the first partition is /usr, /home, /boot, etc. /system folder name under the partition, these partitions will be directly mounted to the response folder under /partition, that is, when When we access /home, we will automatically go to the /home partition. But if we do not divide a /home partition in the partition, then automatically create a home folder under /partition, these two methods are completely equivalent under the Linux system. The advantages and disadvantages are also obvious. Take /home as an example. This is something like my document or library file. Many personal files will be placed here. If your /partition has 30G of free space and 10GB of space in the /home partition, then although we are dragging the files directly to the /home folder, the files are actually stored in the /home partition, so we can't store files larger than 10GB. , but the advantage is that you can save /home files when the system crashes or other problems need to be reinstalled. And if you don't give a separate partition to /home, you have 40GB of free space under /partition, then you can store 40GB in the /home folder, but the danger is that the file will be lost when reinstalling. So the two methods have their own advantages. Independent partitions will limit the amount of data but it is more secure. Non-independent partitions can use space more flexibly but the data will be less secure, although the new Linux system can keep the /home folder when reinstalling. However, it is recommended that experienced veterans give separate partitions to /home and other partitions. For beginners, you can only divide one/swap swap partitions.

Speaking of swap swap partitions, many people have asked this partition. What are you doing? The actual function of this partition is virtual memory + hibernation files. Therefore, for the Linux system, it is necessary to divide the Swap swap partition, and it must be larger than the physical memory, otherwise the system will have problems sleeping. Previously, my post said that Windows can't give too much virtual memory, so Linux? The swap partition on the Linux system has nothing to do with it. The memory management mode of the Linux system is to use physical memory first. The swap swap partition is used only when the physical memory is insufficient. Therefore, if the hard disk is large enough, the swap swap partition is not a problem.

In addition to the above mentioned partitions, there is also a partition that is not a mount point, such as a partition that installs windows system under dual systems, a partition of a mobile hard disk and a USB disk. These partitions are all mounted to /media/, they appear in the form of folders in the media folder under /partition, and some of the discs appear in /cdrom and appear in /media, different systems are different. .

In simple terms, the partition mode of the Linux system is that all partitions except the /partition appear in the directory tree under the /partition in the form of a folder.

Copyright © Windows knowledge All Rights Reserved