Check a disk is HDD or SSD (rotational)


You often get a new PC or laptop or using another person's computer and you may not know the disk technology being used (HDD/SSD). So, on linux you can use a sys kernel file to find it out.

cat /sys/block/sda/queue/rotational
# 0 means SSD, 1 means HDD
# replace "sda" to your needs