How to Verify Linux System on SSD or HDD

As Linux system usage has risen, the storage medium for the operating system has become a key factor to consider. Linux users can install their systems either on a solid-state drive (SSD) or a hard disk drive (HDD). Both storage systems offer advantages and disadvantages and the best choice depends on a number of factors. In this article, we will explore how to verify whether your Linux system is running on an SSD or an HDD.

Verify Linux System on SSD or HDD

Steps How to Verify Linux System on SSD or HDD

1. To identify if a Linux VPS server is running on an SSD or HDD, you can use the command lsblk. This command lists all storage devices connected to the system, including their name, size, and filesystem type.

$ lsblk

output:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
└─sda1 8:1 0 100G 0 part /
sdb 8:16 0 250G 0 disk
└─sdb1 8:17 0 250G 0 part /mnt/data

2. Use cat /sys/block/sdX/queue/rotational command to know whether it is SSD or HDD. In below example we will check the sda.

cat /sys/block/sda/queue/rotational

output:

0

You can see in above example, the output of cat /sys/block/sda/queue/rotationalis “0”, which means it’s SSD. This command will return “0” for SSDs and “1” for HDDs.

Conclusion

The choice between running Linux on an SSD or an HDD is determined by a variety of factors, including cost, speed, and data storage capacity. By understanding which storage option your system is utilizing, you can make better decisions regarding system performance optimization. Whether you prefer the speed of an SSD or the cost-effectiveness of an HDD, understanding the differences between these storage options can allow you to maximize the performance of your Linux system. You may be confident that your Linux system is operating smoothly and efficiently if you consider these factors.

Leave a Comment