1. 方法1

cat /sys/block/sda/queue/rotational
# 返回0:SSD盘
# 返回1:SATA盘

2. 方法2

lsscsi
# 返回 ATA的是SSD