Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com
huuphan.com. Powered by Blogger.

How to check Disk is SSD or HDD on Linux

In this tutorial, How to check Disk is SSD or HDD on Linux. Solid-state drives (SSDs) are fast, silent, and less prone to failure than traditional hard disk drives (HDDs).

  • HDD store information on a rotating disk known as a platter
  • SSD use flash memory to store and persist data.

Using lsblk command to check HDD or SSD

lsblk -o name,rota | tail
If you get a 1 then the disk is an HDD. A 0 (zero) on the column rota is SSD.

The output terminal as below:
How to check Disk is SSD or HDD on Linux

Using the cat Command

cat /sys/block/sda/queue/rotational
If the result is 1, then the disk is an HDD. the output 0 ( zero) that disk is ssd.

The output terminal as below:

Check Disk is SSD or HDD on Linux
 

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com