I want to have a script which tells me what sort of disk I have on my laptop.
I have found a command used how to know if my disk is a ssd or hdd i.e. :
cat /sys/block/sda/queue/rotationalunfortunately I get:
cat: /sys/block/sda/queue/rotational: No such file or directorymy ubuntu version is 20.10.
EDIT: the command:
lsblk | grep disk
gives
nvme0n1 259:0 0 476,9G 0 disk
Is there another command related to my issue?
11 Answer
Your output of lsblk shows that your device is called nvme0n1 instead of sda.
Try:
cat /sys/block/nvme0n1/queue/rotational- 0 = not rotational = SSD
- 1 = rotational = HDD