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
|Requirements, Conventions or Software Version Used
|Any Linux distro
|Privileged access to your Linux system as root or via the
|# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – 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.
$ sudo apt install smartmontools
$ sudo dnf install smartmontools
$ 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
# 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
- Next, use the following
smartctlcommand to determine the firmware version of your hard drive. Keep in mind you’ll need to substitute
/dev/sdawith 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
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.