This guide lists various methods to find Hard disk drive details in Linux operating systems. Using the below methods, you can able to find the hard disk make, hard disk type, size, firmware version and other hardware parameters. First, we will see how to display hard disk details with hdparm command line utilty.

1. Hdparm

Hdparm is a command line program to get or set hardware parameters for PATA, SATA, SAS and SSD devices. It accepts any device as mass storage that is connected to IDE, SATA, SAS interfaces, so we can even retrieve information about CD/DVD drives as well. Using hdparm utility, we can tune the hard disk or DVD drive, test the HDD or SSD speed, reduce noise level by activating acoustic mode, turn energy-saving mode on or off, enable or disable sleep mode, enable/disable drive cache and even erase drives securely. Hdparm is written by Mark Lord, the lead developer and maintainer of the (E)IDE driver for Linux, and current contributor to the “libata” subsystem. Visit site Windows Plesk server support.

A word of caution

Even though hdparm offers significant advantages to increase disk performance, it is also EXTREMELY DANGEROUS. It will very likely lead to massive data loss when some parameters are misused. The hdparm documentation suggests that YOU SHOULD NOT USE SOME COMMANDS AT ANY CIRCUMSTANCES. So I’ve excluded such dangerous commands in this guide. More importantly, It is always recommended to backup your hard drive before testing hdparm on your Linux system.

1.1. Install hdparm on Linux

Hdparm comes pre-installed in most Linux distributions. If it is not included for any reason, install hdparm on your Linux system using the default package manager.

On Arch Linux, Manjaro Linux:

$ sudo pacman -S hdparm

On Debian, Ubuntu, Linux Mint:

$ sudo apt install hdparm

On Fedora, CentOS, RHEL:

$ sudo dnf install hdparm

On openSUSE:

$ sudo zypper install hdparm

1.2. Find Hard Disk Drive Details In Linux Using Hdparm

To display detailed information of the hard disk, simply run hdparm with sudo or root privileges as shown below:

$ sudo hdparm -I /dev/sda | less

Here, sda is my hard disk. Replace it with your own device. Here I have used “less” command for interactive reading. Press ENTER key or hit UP/DOWN arrows to go through the rest of the output. Press q to exit when done.

Sample output from my Ubuntu system:


ATA device, with non-removable media
Model Number: ST9500325AS
Serial Number: 5VEQTRV0
Firmware Revision: D005DEM1
Transport: Serial
Used: unknown (minor revision code 0x0029)
Supported: 8 7 6 5
Likely used: 8
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63

CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 976773168
Logical/Physical Sector size: 512 bytes
device size with M = 1024*1024: 476940 MBytes
device size with M = 1000*1000: 500107 MBytes (500 GB)
cache/buffer size = 8192 KBytes
Nominal Media Rotation Rate: 5400
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec’d by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: 254
Recommended acoustic management value: 208, current value: 208
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns

How to Find Linux Hard Disk Drive Details

As you can see, the hdparm displays the hard disk’s model number, serial number, firmware revision followed by hard disk configuration (no of cylinders, heads, sectors), DMA settings, list of enabled features, security parameters etc. All functions found under “Commands/features” section and marked with an asterisk are currently active.

Similarly, you can check information of other devices.

$ sudo hdparm -I /dev/sdb | less
$ sudo hdparm -I /dev/sdc | less

When running hdparm with no options, -acdgkmur is assumed. Refer man pages to know what each option is for.

$ sudo hdparm /dev/sda
multcount = 16 (on)
IO_support = 1 (32-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 60801/255/63, sectors = 976773168, start = 0

For more details, refer man pages.

$ man hdparm

2. lshw

Lshw (Hardware Lister) is a simple, yet full-featured utility that provides detailed information on the hardware configuration of a Linux system. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, Hard disk drive details, cache configuration, bus speed and a lot more.

2.1. Install lshw in Linux

lshw comes pre-installed with some Linux distributions like Ubuntu by default. If it is not installed by any chance, install lshw in your Linux box using the default package manager like below.

On Arch Linux and its variants like Manjaro Linux, run:

$ sudo pacman -S lshw

On Debian, Ubuntu, Linux Mint:

$ sudo apt install lshw

On Fedora, CentOS, RHEL:

$ sudo dnf install lshw

On openSUSE:

$ sudo zypper install lshw

2.2. Find Hard Disk Drive Details In Linux Using lshw

After installing lshw, simply run the following command to get the details of your hard disk drive in Linux:

$ sudo lshw -class disk

Sample output:

description: ATA Disk
product: ST9500325AS
physical id: 0
bus info: [email protected]:0.0.0
logical name: /dev/sda
version: DEM1
serial: 5VEQTRV0
size: 465GiB (500GB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=8dd04bfd

How to Find Linux Hard Disk Drive Details

To  display only the name of the disks, run:

$ sudo lshw -short -C disk

Sample output:

H/W path Device Class Description
/0/100/1d/1/1/6/0.0.0 /dev/sdb disk Multi-Card
/0/100/1d/1/1/6/0.0.0/0 /dev/sdb disk
/0/100/1f.2/0 /dev/sda disk 500GB ST9500325AS
/0/100/1f.2/1 /dev/cdrom disk DVD+-RW DS-8A8SH

For more details, check man pages.

$ man lshw

3. inxi

Inxi is yet another full-featured command line system information tool. It shows system hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM usage, and a wide variety of other useful information. Be it a hard disk or CPU, mother board or the complete detail of the entire system, inxi will get them for you more accurately in seconds.

3.1. Install inxi in Linux

Inxi is also available in the default repositories of most Linux distributions.

For Arch Linux, it is available in AUR. You can install it using any AUR helper programs, for example Yay.

$ yay -S inxi

On Debian, Uubntu:

$ sudo apt install inxi

On Fedora:

$ sudo dnf install inxi

On CentOS and RHEL:

Enable [EPEL] repository using the following command:

$ sudo dnf install epel-release
$ sudo dnf install inxi

On openSUSE:

$ sudo zypper install inxi

3.2. Find Hard Disk Drive Details In Linux Using Inxi

To get the details of the installed hard disk drives in your Linux system, run:

$ inxi -D

Sample output:

Drives: Local Storage: total: 465.76 GiB used: 376.31 GiB (80.8%)
ID-1: /dev/sda vendor: Seagate model: ST9500325AS size: 465.76 GiB

How to Find Linux Hard Disk Drive Details

Unlike Hdparm and lshw programs, it will only display the hard disk drive details. The hdparm and lshw utilities will display all drive details including CD/DVD ROM.

For more details, refer man pages.

$ man inxi

Suggested read:

4. Smartctl

Smartclt is a command line, control and monitor utility for SMART disks. It controls the Self-Monitoring, Analysis and Reporting Technology (shortly SMART) system built into most ATA/SATA and SCSI/SAS hard drives and solid-state drives. Smartclt command is part of the smartmontools package, which comes pre-installed in most Linux versions.

4.1. Find Hard Disk Drive Details In Linux Using Smartctl

To fetch the complete details about the hard disk drive in your Linux box, run:

$ sudo smartctl -d ata -a -i /dev/sda

Sample output:

smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-29-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke,

Model Family: Seagate Momentus 5400.6
Device Model: ST9500325AS
Serial Number: 5VEQTRV0
LU WWN Device Id: 5 000c50 048fe5ff9
Firmware Version: D005DEM1
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Mon May 11 16:35:54 2020 IST
SMART support is: Available – device has SMART capability.
SMART support is: Enabled

How to Find Linux Hard Disk Drive Details

For more details, refer man pages.

$ man smartctl

5. GNOME Disks

Disks or Gnome-disk-utility is a graphical user interface program to view, modify and configure available storage devices and media in a Linux system. If you are not comfortable with command line way, you can use use GNOME Disks to create and restore disk images, partition and format drives, inspect drive speed, benchmark drives and check health status etc. It comes pre-installed in all Linux distributions that has GNOME desktop environment.

5.1. Find Hard Disk Drive Details In Linux Using GNOME Disks

Launch Disks either from Menu or Dash. It lists all available disks and media in your Linux system.

How to Find Linux Hard Disk Drive Details

Suggested read:

Hope this helps.

Featured Image by Clker-Free-Vector-Images from Pixabay.

Thanks for stopping by!

Help us to help you:

Have a Good day!!linux get disk model,linux hard disk info command,linux check disk type ssd,linux show physical disks,check hard drive ubuntu terminal,how to check hard disk slots in linux,linux disk space,linux get hard drive serial number