Ever needed the model number of the hard disk in your machine but been too lazy (or smart?) to open the sucker up to look? Agreed - me too. Luckily, there are a handful of tools that we can use in a *nix (probably :D - definitely in an LInUx environment) to get all that juicy hard disk gossip!

As some of these tools may not come pre-installed with your flavour of Linux, I will include the installation commands for a few parent-tier™ (I just made that up :)) disros.

For All Storage Drive Types

lshw

For Debian-based systems execute the following:

1
$ apt-get install lshw

For Redhat-based systems run:

1
$ yum install lshw

For systems with pacman e.g. Arch and Manjaro:

1
$ pacman -S lshw

Gentoo-based systems:

1
$ emerge lshw

hwinfo

For Debian-based systems execute the following:

1
$ apt-get install hwinfo

For Redhat-based systems run:

1
$ yum install hwinfo

For systems with pacman e.g. Arch and Manjaro:

1
$ pacman -S hwinfo

Gentoo-based systems:

1
$ emerge hwinfo

For Non-NVME Drives

hdparm

For Debian-based systems execute the following:

1
$ apt-get install hdparm

For Redhat-based systems run:

1
$ yum install hdparm

For systems with pacman e.g. Arch and Manjaro:

1
$ pacman -S hdparm

Gentoo-based systems:

1
$ emerge hdparm

For NVME drives

nvme

As this is not a tool that comes pre-installed with most distros it seems, you’ll have to install it from your distro’s repos. Following are some such commands:

For Debian-based systems execute the following:

1
$ apt-get install nvme-cli

For Redhat-based systems run:

1
$ yum install nvme-cli

For systems with pacman e.g. Arch and Manjaro:

1
$ pacman -S nvme-cli

Gentoo-based systems:

1
$ emerge nvme-cli

:)