How to know if a disk is an SSD or an HDD
Linux automatically detects SSD, and since kernel version 2.6.29, you may verify sda
with:
cat /sys/block/sda/queue/rotational
You should get 1
for hard disks and 0
for a SSD.
It will probably not work if your disk is a logical device emulated by hardware (like a RAID controller).
See this answer for more information about SSD partitioning, filesystem...
With lsblk
(part of the util-linux
package):
lsblk -d -o name,rota
NAME ROTA
sda 0
sdb 0
sdc 1
where ROTA
means rotational device
(1
if true, 0
if false)
Use smartctl
(install by installing smartmontools
) to retrieve vendor information,
sudo smartctl -a /dev/sdb
If you see a line like this,
Rotation Rate: Solid State Device
That would be a SSD drive.