πŸ–₯️ How To Find Out Hard Disk Specs / Details on Linux

Knowing your hard disk details β€” such as model, serial number, firmware version, size, cache, and speed β€” is crucial for diagnostics, performance tuning, or hardware inventory purposes. This guide shows you various commands to gather disk specs on Linux systems like AlmaLinux, CloudLinux, Debian, Ubuntu, and CentOS.


πŸ“Œ Method 1: Using lsblk – List Information About Block Devices

lsblk -o NAME,MODEL,SIZE,ROTA,TYPE,MOUNTPOINT
  • MODEL: Shows disk model
  • ROTA: Indicates if the disk is rotational (1 = HDD, 0 = SSD)

πŸ“Œ Method 2: Using lshw – List Detailed Hardware Info

sudo lshw -class disk -class storage
  • Shows device name, vendor, size, bus info, and more.
  • Install if missing:
sudo apt install lshw   # Debian/Ubuntu
sudo yum install lshw   # RHEL/CentOS
sudo dnf install lshw   # AlmaLinux/CloudLinux

πŸ“Œ Method 3: Using hdparm – Show Device Capabilities

sudo hdparm -I /dev/sdX
  • Replace /dev/sdX with your disk (e.g., /dev/sda)
  • Shows model, firmware, serial number, cache, and more.

πŸ“Œ Method 4: Using smartctl – SMART Monitoring Tool

sudo smartctl -i /dev/sdX
  • Displays model, serial, firmware, capacity, etc.
  • To install:
sudo apt install smartmontools     # Debian/Ubuntu
sudo yum install smartmontools     # RHEL/CentOS
sudo dnf install smartmontools     # AlmaLinux/CloudLinux

πŸ“Œ Method 5: Using /sys Virtual Filesystem

cat /sys/block/sdX/device/model
cat /sys/block/sdX/device/vendor
cat /sys/block/sdX/device/rev
  • Direct low-level information from the kernel

πŸ“Œ Method 6: Using inxi – Versatile System Information Tool

inxi -Dxx

Very readable output. Use -Dxx for detailed disk info.

  • Install if needed:
sudo apt install inxi   # Debian/Ubuntu
sudo yum install inxi   # RHEL/CentOS
sudo dnf install inxi   # AlmaLinux/CloudLinux

πŸ“Œ Bonus: Identify if Disk is SSD or HDD

cat /sys/block/sdX/queue/rotational
  • Output: 0 = SSD, 1 = HDD

πŸ’‘ Tips

  • You can list all your disk devices:
ls /dev/sd*
  • Identify device mount points:
df -hT

πŸ” Example Output (from smartctl -i /dev/sda)

Model Family:     Seagate BarraCuda 7200.14 (AF)
Device Model:     ST2000DM006-2DM164
Serial Number:    Z4Z123AB
Firmware Version: CC26
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Rotation Rate:    7200 rpm

βœ… Conclusion

Using the tools above, you can effectively audit and understand your Linux system’s storage hardware. This can help with performance troubleshooting, disk replacements, or verifying storage quality for virtualization and backup tasks.

Scroll to Top