How to check CPU temperature in Linux

In this post, I am going to discuss how you can check CPU temperature in Linux.

I tested this on Ubuntu 22.04 (LTS). It is working properly. Hope this will also work for all Debian based distributions.

Note: This will work only on the physical system. I have tested this on the cloud instance (AWS & Digital Ocean), and it did not work.

Step 1: Log in to your server and run this command. (No need to add sudo if you have root access)

sudo apt update && apt upgrade -y

Step 2: Now we need to install lm-sensors. To do that type the below command.

sudo apt install lm-sensors

cpu temperature check

Next, you need to detect hardware monitoring chips installed on your system.

Step 3: Type the following command.

sudo sensors-detect

cpu sensors

If everything is okay then the command will appear with YES/No, just type YES to continue.

Now, Load the module using the below command if you did not get any errors.

/etc/init.d/kmod start

Your installation is done successfully. Type the below command to check CPU temperature.

sensors

sensors

You can also type watch sensors to check live CPU temperature (Ctrl + C to exit).

Comment below if you get any errors.

 

2 thoughts on “How to check CPU temperature in Linux”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top