How to check CPU temperature on Ubuntu Linux

To check the CPU temperature on Ubuntu Linux, you can use the ‘sensors’ command. This command is part of the lm-sensors package, which is not installed by default on Ubuntu. To install it, you can run the following command:

sudo apt-get install lm-sensors

Once the package is installed, you can run the ‘sensors’ command to check the temperature of your CPU. You will see the temperature reading in degrees Celsius next to the label “Core” or “Physical id”.

Alternatively, you can use the ‘cat’ command to check the CPU temperature. The file ‘/sys/class/thermal/thermal_zone0/temp’ contains the temperature of the CPU in millidegrees Celsius. You can use this command to check the temperature:

cat /sys/class/thermal/thermal_zone0/temp

You can convert millidegrees to degrees by dividing the value by 1000.

Leave a Comment