+1 votes
asked in Computer by (12k points)

How to tell if a drive is SSD or HDD from the terminal

1 Answer

+2 votes
answered by (178k points)

Surely in the computer we use every day is not necessary because we all know roughly what is inside, but it may be the case that one point we want to know if the disk of a computer is solid type (SSD) or classic HDD hard drive, I can think of a couple of examples: when accessing computers remotely and also when we provide or evaluate any computer.
That is something we can do quickly from the terminal and as always in GNU / Linux there are several ways:
Using the command
cat / sys / block / sda / queue / rotational
Now depending on the output of the command:
- If "1" We are talking about a disk HDD
- If the value returns "0" would be an SSD (is that there's nothing that is spinning and spinning;-))
Sounds too simple the previous solution? Let's try the smartctl command that is part of the Smartmontools, a collaboration tools available on all GNU / Linux distros, which provides information on the status of the hard disk
smartctl -a / dev / sda
As VENES a command to be run as root (if using Ubuntu can use "sudo" instead of "your") and a wide output shows us where we need to look in the "rotation rate"
- If you give us something like this: "Rotation Rate: xxxx rpm" would be an HDD
- In the event that the output is "Rotation Rate: Solid State Device" would not we need more clues to know that we have a SSD
As a bonus I leave this command is also pretty cool and its corresponding output:
cat / sys / block / sda / {removable, queue / rotational}
Yes, you guessed it! the first value shows if one ("removable") external drive that can be removed and the second (rotational) if HDD or SSD as we saw at the beginning of the post.

Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.