List Hard Drives in CentOS: Quick Guide

To list all hard drives in CentOS, you can use the following command to view the recognized disk devices in the system:

lsblk

This command will display information about all block devices in the system, including hard drives, partitions, and mount points. You can understand the situation of the hard drives in the system by examining the output.

Furthermore, you can also use the fdisk command to display information about hard drive partitions:

fdisk -l

This command will display partition information for all hard drives, including partition number, type, starting sector, ending sector, etc.

bannerAds