Retrieving disk information from the command line
Want to know details of your hard disk even without physically touching it? Here are a few commands that will do the trick. I will use /dev/sda as my disk device, for which I want the details.
smartctl -i /dev/sda
SMART (Self-Monitoring, Analysis and Reporting Technology) tasks such as printing the SMART self-test and error logs, enabling and disabling SMART automatic testing, and initiating device self-tests. When the command is used with the ‘ –i ’ switch, it gives information about the disk.
The output of the above command will show the model family, device model, serial number, firmware version, user capacity, etc, of the hard disk (sda).
You can also use the hdparm command:
hdparm -I /dev/sda
hdparm can give much more information than smartctl.
—Munish Kumar, munishtotech@gmail.com