« Back to Frequently Asked Questions

How to see hard disk specifications and details

Under normal conditions, you may not need to know much about the hard disk(s) itself. But when you do, it is nice to know what tools are available to query the right piece of information. Information like vendor, disk type, speed, and size.

Show available hard disk devices

If we want to know what hard disks are available, have a look at how to see the available hard disks.

Basic information about hard disks (using lshw)

Basic information about a hard disk can be displayed using lshw. It shows the device name, size, sector sizes, and some capabilities of the hard disk. It’s a great start, and sometimes enough to get the information you wanted.

# lshw -class disk
       description: DVD reader
       product: QEMU DVD-ROM
       vendor: QEMU
       physical id: 0.0.0
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/sr0
       version: 2.5+
       capabilities: removable audio dvd
       configuration: ansiversion=5 status=nodisc
       description: SCSI Disk
       product: QEMU HARDDISK
       vendor: QEMU
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       version: 2.5+
       size: 16GiB (17GB)
       capabilities: 5400rpm gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=59907fc9-3694-4808-8f5b-9032ae1b279d logicalsectorsize=512 sectorsize=512

Show specifics about SATA hard disks (using hdparm)

The next tool is hdparm and like previous tool often available on Linux systems. To query identification information from the drive itself, we can use the -I option.

# hdparm -I /dev/sda

ATA device, with non-removable media
	Likely used: 1
	Logical		max	current
	cylinders	0	0
	heads		0	0
	sectors/track	0	0
	Logical/Physical Sector size:           512 bytes
	device size with M = 1024*1024:           0 MBytes
	device size with M = 1000*1000:           0 MBytes 
	cache/buffer size  = unknown
	IORDY not likely
	Cannot perform double-word IO
	R/W multiple sector transfer: not supported
	DMA: not supported
	PIO: pio0

Information about NVMe devices (using nvme)

The hdparm will most likely not able to show information about newer disk types. For NVMe disks, we can use the nvme tool.

# nvme list /dev/nvme0
Node                  SN                   Model                                    Namespace Usage                      Format           FW Rev  
--------------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1          SSSSSSSSSSSSSSS      Samsung SSD 960 PRO 1TB                  1          89,74  GB /   1,00  TB    512   B +  0 B   12345678
/dev/nvme1n1          STTTTTTTTTTTTTT      Samsung SSD 960 PRO 1TB                  1          53,20  GB /   1,00  TB    512   B +  0 B   12345678

Important: without root permissions, no details will be shown

The nvme tool is most likely part of the nvme-cli package and might to be installed first.

Relevant commands in this article

Like to learn more about the commands that were used in this article? Have a look, for some there is also cheat sheet available.


Small picture of Michael Boelen

This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution.

Mastodon icon