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:#
For Redhat-based systems run:#
For systems with pacman e.g. Arch and Manjaro:#
Gentoo-based systems:#
hwinfo
#
For Debian-based systems execute the following:#
1
| $ apt-get install hwinfo
|
For Redhat-based systems run:#
For systems with pacman e.g. Arch and Manjaro:#
Gentoo-based systems:#
For Non-NVME Drives#
hdparm
#
For Debian-based systems execute the following:#
1
| $ apt-get install hdparm
|
For Redhat-based systems run:#
For systems with pacman e.g. Arch and Manjaro:#
Gentoo-based systems:#
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:#
For systems with pacman e.g. Arch and Manjaro:#
Gentoo-based systems:#
:)