Home > Article > Operation and Maintenance > What is partition in linux
There is a term called partition in the Linux operating system. Do you know what it means? What does it do? Take a look.
#1. What is a partition?
Partitioning is to divide a hard disk drive into several logical drives. Partitioning is to use the continuous blocks of the hard disk as an independent magnetic hard drive. The partition table is an index of hard disk partitions, and the partition information will be written into the partition table.
2. Why do we need multiple partitions?
Prevent data loss: If the system has only one partition, then if this partition is damaged, the user will lose all data.
Increase disk space usage efficiency: You can format the partition with different block sizes. If there are many 1K files and the hard disk partition block size is 4K, then 3K space will be wasted for each file stored. . At this time we need to take the average of these file sizes to divide the block size.
Data surge to the limit will not cause system hangs: Separating user data and system data can prevent user data from filling the entire hard disk and causing system hangs.
3. Introduction to the usage of partition tool fdisk
Introduction to fdisk command parameters
p. Print the partition table.
n. Create a new partition.
d. Delete a partition.
q. Exit without saving.
w. Write the partition into the partition table, save and exit.
The above is the detailed content of What is partition in linux. For more information, please follow other related articles on the PHP Chinese website!