How to Know if You’re Using SSD or HDD in Ubuntu terminal

$ lsblk -o NAME,ROTA
-o, --output list, Specify which output columns to print
ROTA means rotational device
You should get 1 for rotational device (HDD)

$ lsblk -o NAME,ROTA
You should get 0 for a SSD.