- How Using lsblk command to find out hard disk information?
- How Using hdparm Command in linux to get disk information ?
- How to use lshw Command in Linux to get disk information?
- The smartctl command
If you are a Linux user or Linux system administrator, be sure to get the information you need about the hard disk. Information such as description, product name, bus type, size and cache. In this article we will teach you how to do this and by what commands it will be possible.
How Using lsblk command to find out hard disk information? #
Run the lsblk command as follows to lists information about all available or the specified block devices:
On My server , result like this :
Another option is to run the following command to list all disks and their names:
How show block device such as hard disk drive attributes in Linux ? #
Open the terminal app and then type the blkid command:
How Using hdparm Command in linux to get disk information ? #
Open the terminal and type the following command to find information about /dev/sda:
maybe you will see following error :
How install hdparm Command on Centos with Yum : #
Run below command :
How install hdparm Command on Ubunto : #
Then Try again , You see result someting like below Picture :
as you can see we found following information about our disks :
Disk Model Number , Serial Number , device size , Speed and other .
How to use lshw Command in Linux to get disk information? #
You need to install lshw command using apt-get or yum command. To display all disks and storage controllers in the system, enter:
Finding Out Linux Disks Names Only #
The following lshw command will quickly list installed disks including CD/DVD/BD drivers:
Another option so to run the fdisk command as follows:
Use the grep command/egrep command to filter out loopback and other unwanted devices:
The smartctl command #
The smartctl command act as a control and monitor Utility for SMART disks under Linux and Unix like operating systems. Type the following command to get information about /dev/sda (SATA disk):