How can one check the type and number of disks in Linux?

To check the types and quantities of disks on a Linux system, you can use the following command:

  1. Show information about block devices.
lsblk

This command will display the names, sizes, and types of disks and partitions.

  1. Partitioning tool
sudo fdisk -l

This command requires administrator privileges and will display partition table information of the disk, including disk type, size, and number of partitions.

  1. Could you clarify what you mean by “df”?
df -h

This command will display disk usage of mounted file systems, including partition size, used space, and available space.

In conclusion:

  1. The lsblk command is used to display information about disks and partitions on the system.
  2. The fdisk command provides detailed information about the disk, including the type, size, and number of partitions.
  3. The df command can be used to view the disk usage of mounted file systems, including partition size, used space, and available space.
bannerAds