Hardware

Is Your Storage Drive An SSD Or An HDD?

Today’s article aims to answer a simple question, simply is your storage drive an SSD or an HDD? This is not something most folks will have trouble knowing, but it’s still something worth knowing how to do. After all, you never know when you’ll be attached to a remote computer with disks of different types.

And, yes, due to expense and sizes, HDDs still exist and are still in use all over the place. Not everything has been converted to an SSD.

We’ve relied on spinning media for quite some time. We used this in hard disk drives. They were the norm for many years. SSDs (solid-state drives) are more common in end-user computers these days. If you can, you might even have an NVME SSD which is exceptionally fast.

We’re only going to use one command in this article, so it will be quite short. That’s not a bad thing. Not every article needs to be all that long.

We’ll simply be using the cat command. We’ve used this command many times in the past because it’s a handy command to use!

cat:

The cat command is a command used in the terminal. We want to read a file and cat is the correct tool for the job. The cat command reads a file and sends the output to the terminal. You won’t need to install anything.

Let’s check the man page (with man cat) to see:

cat – concatenate files and print on the standard output

See? If we want to read a file to the terminal, this is the correct tool for the job. Again, you won’t need to install anything.

An SSD Or An HDD:

Like oh so many articles, you will need an open terminal. Just press CTRL + ALT + T and your default terminal should open.

With your terminal open, let’s see if you’ve got an SSD or an HDD.

First, identify your drives with this command:

lsblk

Now, ignoring the partitions, you can run the following command:

cat /sys/block/<drive_ID>/queue/rotational

So, for example, you’d run this command:

cat /sys/block/sda/queue/rotational

And here’s an example output:

$ cat /sys/block/sda/queue/rotational
0

The zero means that it’s an SSD. 

If we run this command against a drive that I know is an HDD (a plugged-in external HDD that’s used for backups and storage):

$ cat /sys/block/sdb/queue/rotational
1

The 1 means that it is a spinning HDD.

So, if you have both you can now distinguish between an SSD and an HDD.

Closure:

So, now you know how to tell if your device is an SSD or an HDD. This is something easily determined. If you have questions about your storage, this will help answer those questions. I’m not sure that I’d memorize this command, but it’s worth adding to your notes.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

Enable/Disable Your Network Interface

Today we'll cover one way to enable or disable your network interface in the Linux…

4 months ago

Check Your NIC Speed In The Terminal

Today's exercise is a nice and simple exercise where we check your NIC speed in…

4 months ago

Easily Monitor Your Wireless Connection

Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…

4 months ago

Count The Files In A Directory

I think I've covered this before with the ls command but this time we'll count…

4 months ago

Get System Information With The ‘uname’ Command In Linux

Today we'll be learning about a basic Linux command that's known as 'uname' and it…

4 months ago

hardinfo Has Been Rebooted As hardinfo2

If you've used hardinfo in the past, it may interest you to know that hardinfo…

4 months ago