Solid-state drives (SSDs) have been on the rise in recent years; They are faster, quieter, and less prone to failure than traditional hard disk drives (HDDs). Still, HDDs power a lot of computers.
Not sure what type of disk drive your Linux PC is using? Here’s how to easily check your disc type without opening the hood.
Difference Between Hard Disk and Solid State Drive
Hard disks store information on a rotating disk known as a platter. They access and write data to the platter with rotating heads. The rotating platter in a hard disk makes noise because it spins whenever data is read or written to the hard disk.
Solid-state drives, on the other hand, use flash memory to store and retain data. SSDs have no moving parts so they are silent. The advantage of having no moving parts is that it is less prone to failure. Reading and writing data to SSD is much faster than writing to HDD.
Fortunately, you don’t need to intervene with the hardware to find out your desktop’s disk type. Instead, you can use the following Linux command.
1. Using the lsblk command
lsblk (list block devices) is a command-line utility for listing block devices, e.g. flash drives and hard drives on your Linux system. However, the command does not list the RAM devices.
The lsblk utility comes as part of most Linux installations. If it is not available on your system, you can install it using your distro’s default package manager. Run the following command to get the type of disk you have.
The previous command lists all block devices on your system, including disk drives. The -o name, rota command flag instructs the lsblk utility to output the name and rotational columns.
A 0 (zero) on the rota column indicates that the disk is not rotational hence an SSD. If you get 1 then the disk is an HDD.
Therefore, the disk for this Linux system is an SSD.
2. Using the Cat Command
The cat command is a powerful utility for appending files to standard output. It’s also a great option for checking your disk type on Linux.
Linux systems have a file that shows whether your disk is spinable or not. This file is usually located in the /sys/block directory on most systems.
On other systems, you’ll need to replace sda in the previous command with nvme0n1, or something similar.
The output shows that the disk is an SSD because the rotational output is 0 (zero) or false. If the result is 1, then the disk is an HDD.
3. Using the GUI
On most distros that use GNOME, you can check your disk type using the Files application. Press the super key then find files and launch it. Click the Other Locations tab on the sidebar. This will present you with a list of all disk drives. The highlighted disk is marked as SSD, so it’s using the system SSD.
Other desktop environments will have similar options to check whether the laptop is using an SSD or HDD as a disk drive.
Upgrade to SSD for a Faster Linux Experience
The lsblk and cat commands are great utilities for checking the type of disk your Linux system is using.
SSD has many advantages compared to HDD. If your PC is using an HDD and you want to improve its performance, consider upgrading to an SSD.
Adding RAM or a new SSD makes a lot of sense if you’re looking to increase your computer’s performance. Either option can provide an advantage and cause an otherwise slow computer to start running faster.
One problem that people face when choosing these upgrades is that they are somewhat similar. RAM is a type of memory, and SSD is a type of storage. Because of this, it is easy to misjudge which will have the greatest impact.
So, what’s the difference really—and which one does your computer need?
What is Ram?
RAM stands for Random Access Memory. It is much faster than SSD and hence is used for any type of data that the computer needs to access quickly. RAM is used by programs while they are running. It is also used by your computer when accessing your hard drive.
The downside of RAM is that anything stored in it disappears when you turn off your computer. Therefore it is only suitable for temporary storage.
What is SSD?
SSD stands for Solid-State Drive. SSD is a type of hard drive, and it is used for permanent storage. This is where the operating system and your programs are installed. This is where all your media files are stored. If your computer is running low on storage space, it’s the hard drive being used, not the RAM.
The downside of SSD is that it is much slower than RAM. Solid-state drives are much faster than traditional hard drives, but there’s still no comparison.