Linux find NVMe SSD temperature using command line

How do I find NVMe SSD temperature using Linux command line options?

NVMe is an acronym for Non-Volatile Memory Express. It is a communications interface standard that defines a command set and feature set for PCIe-based SSDs. NVMe SSD reads and writes data three to four times faster than the SATA SSDs. You must have support for NVMe with M.2 slot on your motherboard to use NVMe SSD. Most modern Laptops or desktop systems have at least one such slot. This page shows how to read and find out NVMe SSD temperature on Linux.

Linux find NVMe SSD temperature command

The procedure to show NVMe SSD temperature on Linux is as follows:

  1. Open the terminal application
  2. Install nvme-cli tool on Linux using your package manager
  3. Run sudo nvme smart-log /dev/nvme0 Linux command to display temperature information for NVMe SSD

Let us see how to install nvme-cli and display temperature using the command line options.

How to install nvme-cli on Linux

Run the following command as per your Linux distro.

Ubuntu/Debian Linux

Type apt command or apt-get command:
sudo apt install nvme-cli

Fedora Linux

Execute the following dnf command:
sudo dnf install nvme-cli

CentOS/RHEL 7.x or 8.x

Turn on EPEL repo on a CentOS/RHEL 7.x (see how to enable EPEL repo on a CentOS 8 or enable EPEL repo on an RHEL 8) and run:
sudo yum install nvme-cli
Sample outputs:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package nvme-cli.x86_64 0:1.8.1-3.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
 Package           Arch            Version                 Repository     Size
 nvme-cli          x86_64          1.8.1-3.el7             base          282 k
Transaction Summary
Install  1 Package
Total download size: 282 k
Installed size: 519 k
Is this ok [y/d/N]: y
Downloading packages:
nvme-cli-1.8.1-3.el7.x86_64.rpm                           | 282 kB   00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : nvme-cli-1.8.1-3.el7.x86_64                                 1/1 
  Verifying  : nvme-cli-1.8.1-3.el7.x86_64                                 1/1 
  nvme-cli.x86_64 0:1.8.1-3.el7                                                

Arch Linux

Type pacman command:
sudo pacman -S nvme-cli

OpenSUSE or Suse Linux

As usual run the zypper command:
sudo zypper install nvme-cli

Alpine Linux

Use apk command as follows
sudo apk add nvme-cli nvme-cli-doc

How do I display NVMe PCI SSD temperature on Linux

First, login as root user using the su command or sudo command:
sudo -i
su -
Now, check NVMe temp in Linux:
sudo nvme smart-log {Device_Name}
sudo nvme smart-log /dev/nvme0
sudo nvme smart-log /dev/nvme1n1

The ‘{Device_Name}’ may be either an NVMe character device. For example, /dev/nvme0) or an nvme block device such as /dev/nvme0n1. Use the grep command to filter out data:
sudo nvme smart-log /dev/nvme0 | grep '^temperature'
Use bash for loop for multiple devices as follows:

 # /dev/nvme0 and /dev/nvme1
for d in /dev/nvme{0..1}
 echo "$d - $(sudo nvme smart-log $d | grep '^temperature')"


You learned the nvme Linux command that we used to find NVMe SSD temperature. This command has many more options. See the man page by typing the following man command or visiting the project page online here:
man nvme
nvme help

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

Comments on this entry are closed.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.