How to view hard disk information using hdparm in Linux

hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS “libata” subsystem and the older IDE driver subsystem. Many newer (2008 and later) USB drive enclosures now also support “SAT” (SCSI-ATA Command Translation) and therefore may also work with hdparm. E.g. recent WD “Passport” models and recent NexStar-3 enclosures. Some options may work correctly only with the latest kernels.

Use

Example

Display related settings of hard disk

hdparm /dev/sda

Display the number of cylinders, heads, and sectors of the hard disk

hdparm -g /dev/sda

Evaluate hard drive read efficiency

hdparm -t /dev/sda