Find out if a hard drive is SSD or HDD

How can we check whether a hard drive is SSD or HDD? There are two ways for you to find it out.

Way 1: On the latest kernels, the SSD disks are automatically detected. You can find the result typically like this:

Replace sda with your hard drive path.

$ cat /sys/block/sda/queue/rotational

You will get a number from the output. “1” means you are running a HDD, and “0” means SSD.


Way 2: If you do not have the smartctl tool, you have to install it, like this:

$ sudo apt-get install smartmontools

Find out if you have a SSD or a normal HDD:

$ sudo smartctl -a /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-229.11.1.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke,

Device Model: INTEL SSDSC2BW2****
Serial Number: CVDA3521036J24****
LU WWN Device Id: 5 5cd2e4 04b8e****
Firmware Version: DC32
User Capacity: 240,057,409,536 bytes [240 GB]

If you get this output, it means you have an SSD, else, it is an HDD.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.