Determining the number of partitions in a Linux system is a common operation and can be confirmed in a variety of ways. This article will introduce several commonly used methods and provide specific code examples.
sudo fdisk -l
After executing the above command, the system will list the detailed partition information of all disks, including partition size, file system type, etc. Through this command, you can clearly see the number of partitions in the system.
lsblk
After executing the above command, the system will list the information of all block devices, including the partition structure. You can confirm the number of partitions in the system based on the output.
df -h
After executing the above command, the system will list the space usage of the current file system and display the mount point information. The mount points allow you to determine the number of partitions present in the system.
Through the above methods, you can confirm the number of partitions in the Linux system. In actual operation, you can choose a suitable method to view the partitioning of the system according to different needs.
The above is the detailed content of How to confirm the number of partitions in Linux system. For more information, please follow other related articles on the PHP Chinese website!