Low Orbit Flux Logo 2 F

How to Use lm-sensors to Monitor CPU Temperature on Ubuntu Linux

How to Use lm-sensors to Monitor CPU Temperature on Ubuntu Linux

Today we are going to show you how to use lm-sensors to monitor the temperature of your CPU on Ubuntu Linux.

You can start out by installing the lm-sensors and hddtemp packages if you don’t already have them.


sudo apt install lm-sensors hddtemp

You are going to want to run the following to detect which sensors are available on your system. You can generally accept the defaults for most questions that it asks you.


sudo sensors-detect

Finally the sensors command can be used to check the temperature values detected by the sensors on your system.


sensors

Here is some example output from my system. Notice that it shows the temperature for each individual core of my CPU.


iwlwifi_1-virtual-0
Adapter: Virtual device
temp1:            N/A  

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +119.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +36.0°C  (high = +86.0°C, crit = +100.0°C)
Core 0:        +35.0°C  (high = +86.0°C, crit = +100.0°C)
Core 1:        +35.0°C  (high = +86.0°C, crit = +100.0°C)
Core 2:        +36.0°C  (high = +86.0°C, crit = +100.0°C)
Core 3:        +34.0°C  (high = +86.0°C, crit = +100.0°C)
Core 4:        +35.0°C  (high = +86.0°C, crit = +100.0°C)
Core 5:        +34.0°C  (high = +86.0°C, crit = +100.0°C)
Core 6:        +36.0°C  (high = +86.0°C, crit = +100.0°C)
Core 7:        +35.0°C  (high = +86.0°C, crit = +100.0°C)

nvme-pci-0200
Adapter: PCI adapter
Composite:    +44.9°C  (low  = -273.1°C, high = +84.8°C)
                       (crit = +84.8°C)
Sensor 1:     +44.9°C  (low  = -273.1°C, high = +65261.8°C)
Sensor 2:     +46.9°C  (low  = -273.1°C, high = +65261.8°C)

Video: lm-sensors - Monitor CPU Temperature

Psensor GUI Tool

You can also install a GUI tool for monitoring CPU and other hardware temperature sensors. Use the following command.


sudo apt install psensor

Run it like this:


psensor

This is what it looks like on my system:

psensor - How to Use lm-sensors to Monitor CPU Temperature on Ubuntu Linux

Other Distros

Install on Arch Linux:


sudo pacman -S lm_sensors

Install on Open SUSE


sudo zypper in sensors
  

Install on Red Hat / RHEL / Fedora / Centos with one of these commands depending on how old your system is:

  
sudo yum install lm_sensors
sudo dnf install lm_sensors