How To Check CPU Temperature in Ubuntu Linux

This quick tutorial shows you how to check the CPU temperature on Ubuntu and other Linux distributions with a help of a tool called Psensor.

How to check CPU temperature in Ubuntu Linux

Overheating of laptops is a common issue one faces these days. Monitoring hardware temperature may help you diagnose why your laptop is getting overheated. In this article, we’ll learn how to check the CPU temperature on Ubuntu.

Check CPU temperature in Linux command line

You can check the CPU temperature using a command line utility called sensors. Combine it with the watch command to keep on monitoring the CPU temperature in the terminal like this:

watch -n 2 sensors

If your distribution doesn’t have sensors command installed already, you can use your distributions’ package manager to install either sensors or lm-sensors package.

You can see the CPU temperatures refreshed for each core every two seconds:

Every 2,0s: sensors

iwlwifi-virtual-0
Adapter: Virtual device
temp1:        +39.0°C

acpitz-virtual-0
Adapter: Virtual device
temp1:        +27.8°C  (crit = +119.0°C)
temp2:        +29.8°C  (crit = +119.0°C)

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

That was easy, wasn’t it? Let’s see how to do it graphically.

Check CPU temparature with Psensor GUI tool

We’re going to use a GUI tool, Psensor, that allows you to monitor hardware temperature on Linux. With Psensor you can:

  • monitor the temperature of the motherboard and CPU sensors
  • monitor the temperature of the NVidia GPUs
  • monitor the temperature of the hard disk drives
  • monitor the rotation speed of the fans
  • monitor CPU usage

The latest version of Psensor also provides an applet indicator for Ubuntu and thus it makes the monitoring of hardware temperature even easier on Ubuntu. You can choose to display the temperature right in the top panel itself. It can even send a desktop notification when the temperature exceeds the limit.

Install Psensor on Ubuntu 18.04 and 16.04

Before you install Psensor, you need to install and configure lm-sensors, a command-line utility for hardware monitoring. If you want to measure hard disk temperature, you need to install hddtemp as well. To install these tools, run the following command in a terminal:

sudo apt install lm-sensors hddtemp

Then start the detection of your hardware sensors:

sudo sensors-detect

To make sure that it works, run the command below:

sensors

It will give you an output like:

acpitz-virtual-0
Adapter: Virtual device
temp1: +43.0°C (crit = +98.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +44.0°C (high = +100.0°C, crit = +100.0°C)
Core 0: +41.0°C (high = +100.0°C, crit = +100.0°C)
Core 1: +40.0°C (high = +100.0°C, crit = +100.0°C)

If everything seems alright, proceed with the installation of Psensor by using the command below:

sudo apt install psensor

Once installed, run the application by looking for it in the Unity Dash. On the first run, you should configure which stats you want to collect with Psensor.

configure psensor to measure temperature in Ubuntu
Configuring psensor

Display temperature in the panel

If you want to show the temperature in the top panel, go to Sensor Preferences:

show temperature in psensor ubuntu

Then under the Application Indicator menu, select the component for which you want to display the temperature and then check the Display sensor in the label option.

display temperature in top panel with psensor in Ubuntu

Start Psensor at each startup

Go to Preferences->Startup and then check Launch on session startup to start Psensor at each boot.

Psensor_Ubuntu_3

That’s it. Everything you need for monitoring and checking your CPU temperature is here. You can keep an eye on it and it may help you find out which process is overheating your computer.

If you prefer the command line, you can use a few commands to monitor the GPU and CPU temperature in the Linux terminal. There are terminal based tools like s-tui as well that let you monitor CPU utilization in a fancy way.

However, do note that it’s often the hardware that causes overheating. If you use a desktop computer, you should regularly clean it. You can refer to this article about reducing CPU temperature.

I hope you find this article useful. Please take a moment to share the article on social media, Hacker News and other such websites. Thank you.

Similar Posts

  • Hi, I use lubuntu 20.04.02
    I installed it, all seemed fine but even by following the guide it doesn’t display the temps on the panel, it’s very strange because it doesn’t even ope the scroll menu but only the window which is very similar to the first run, it updates the temps there but I’d like to have at least one temp shown on the panel…any suggestions on how to proceed?

  • Hi Abhishek,
    Thanks once again to you and ItsFoss! I installed lm-sensors on my Ubuntu 20.04 Lenovo Z50 laptop following the steps here. Once I enter the sensors command, I see an output on the command-line showing temperature and few lines. I don’t see any entry for Laptop fan speed. How do we check fan speed using this command?

  • How do you monitor the PSU temperature ? My PSU fan occasionally increases to high speed for 10 secs and then slows down. I would like to know if the PSU is getting hot or is it just an anomaly somewhere ?