The command line terminal on Linux systems can give us a lot of insight into the hardware of a computer. Among many other things, we can retrieve the HDD firmware directly by using the Linux command line.
Once you know the firmware version of your hard drive or solid state drive, you can compare with the latest releases from the manufacturer to determine if its time for an upgrade. The process for upgrading a drive’s firmware will vary by manufacturer, so you’d have to consult its official site for complete instructions.
In this tutorial, you’ll see how to check the firmware version of your hard drive on the Linux command line.
In this tutorial you will learn:
- How to install smartmontools on major Linux distros
- How to check HDD firmware version with
smartctl
command

Category | Requirements, Conventions or Software Version Used |
---|---|
System | Any Linux distro |
Software | smartmontools |
Other | Privileged access to your Linux system as root or via the sudo command. |
Conventions | # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Install smartmontools on major Linux distros
In order to check the HDD firmware version, you’ll need to install the
smartmontools
software package. This software is available in official repositories on nearly all Linux distributions.
You can use the appropriate command below to install the program with your system’s package manager.
To install smartmontools on Ubuntu, Debian, and Linux Mint:
$ sudo apt install smartmontools
To install smartmontools on CentOS, Fedora, AlmaLinux, and Red Hat:
$ sudo dnf install smartmontools
To install smartmontools on Arch Linux and Manjaro:
$ sudo pacman -S smartmontools
After the package is installed, move on to the section below to see how to check your HDD (or SSD) firmware version.
Check HDD firmware version
- First, you’ll have to determine what block device file your hard drive is using. This can be done with the
fdisk -l
orlsscsi -g
commands.# lsscsi -g [0:0:0:0] disk ATA INTEL SSDSA2BW16 4PC1 /dev/sda /dev/sg0
The output in this example shows that our hard drive is linked to the
/dev/sda
device file. - Next, use the following
smartctl
command to determine the firmware version of your hard drive. Keep in mind you’ll need to substitute/dev/sda
with whatever the device file is for your own hard drive. Also remember that you must run this command with root permissions, or you won’t receive any output.# smartctl --xall /dev/sda | grep -i firmware Firmware Version: 4PC1LE05
Closing Thoughts
In this tutorial, we saw how to check the firmware version of a hard drive or solid state drive in Linux. This is facilitated by the smartmontools
package, which is a broad toolkit we can use to troubleshoot hard drive issues or simply ascertain information about various specifications.