If you ever need to get your hard drive’s model and serial number without physically looking at it, you can do so with the hdparm command line utility. This is especially useful if a manufacturer requires the serial number for an RMA or any other servicing needs.

In this example, we are retrieving the model and serial number of the system’s first drive that is labeled /dev/sda:

$ hdparm -I /dev/sda | grep -i number
 Model Number: WDC WD5000AAKX-00ERMA0
 Serial Number: WD-WMC2E0607821
CODE

If you also want to see the size of all the disks in a system, you can easily view the size with:

$ fdisk -l | grep -i ^Disk
 Disk /dev/sda: 500.1 GB, 500107862016 bytes
CODE