How to check disk information in Ubuntu?

To view the disk information of the Ubuntu system, you can use the following command:

  1. Check the disk usage using the df command.
df -h

This will display the usage of each mounted disk partition in the system, including disk capacity, used space, available space, and mount point.

  1. Check disk partition information using the fdisk command.
sudo fdisk -l

This will display detailed information about all disks and disk partitions in the system, including disk size, partition type, and file system type.

  1. Check the disk and partition information using the lsblk command.
lsblk

This will display information about all disks and disk partitions in the system, including disk size, partition size, and mount point.

  1. Check the health status of the disk using the smartctl command.
sudo smartctl -a /dev/sdX

Replace “/dev/sdX” in the command with the disk device you want to check, this will display the disk’s health status, temperature, error messages, etc.

Please note that you may need to use sudo or run as the root user to gain full permissions and information when using these commands.

bannerAds