How to Find Out if a Drive is a SSD or an HDD

This trick is very usefull when you want to buy a laptop. It is better to check yourself if an hard drive is a SSD or an HDD.

There are two methods (that I know of) for doing this:

Method 1:

On the latest kernels the SSD disks are automatically detected. This is how you verify:

Replace sda with your hard drive path.

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

You will a number as an output

  • means you have a HDD
  • 0 means you have a SSD

Method 2:

This method needs root access and internet.

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

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

Rotation Rate: Solid State Device



Tagged with: , , , , , , , ,
Posted in The Linux and Unix Articles!
2 comments on “How to Find Out if a Drive is a SSD or an HDD
  1. Tommy Herbert says:


  2. Tiago Cruz says:

    I don’t know man, this ‘rotational’ is a lier :p

    [root@xenserver ~]# cat /sys/block/sda/queue/rotational

    [root@xenclient ~]# cat /sys/block/xvda/queue/rotational

    [root@xenclient ~]# sudo lspci -vv | grep -i xen
    00:03.0 SCSI storage controller: XenSource, Inc. Xen Platform Device (rev 01)

    WTF? :p

Leave a Reply to Tiago Cruz Cancel reply

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




Subscribe to get the latest Linux news and how to guides directly on your e-mail!