On Linux, if your CPU is running hot, you won’t be able to open up an official AMD or Intel utility to check the temperature. Instead, to check CPU temperature on Linux, you must rely on third-party programs. In this guide, we’ll go over some ways to check the CPU temperature on Linux.
Method 1 – Lm_Sensors
Lm_Sensors is a command-line utility that can be set up to scan various hardware sensors on a Linux PC to report temperature status. Lm_Sensors is a useful tool to use to check your CPU’s temperature in a pinch.
No Linux distributions currently come with Lm_Sensors, so before we go over how to use it, we must demonstrate how to install the program on your Linux PC. To start the installation, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. From there, follow the command-line instructions down below that correspond with your Linux operating system.
On Ubuntu, the Lm_Sensors application is easily installed with the Apt command below.
sudo apt install lm-sensors
Using Debian Linux? You’ll be able to install the program with the following Apt-get command.
sudo apt-get install lm-sensors
The Lm_Sensors application is available to Arch Linux users in the “Extras” software repository. Ensure that “Extra” is enabled on your Arch system. Then, use the following Pacman command to get it set up.
sudo pacman -S lm_sensors
To install Lm_Sensors on Fedora Linux, use the Dnf command below to set up the program on your system.
sudo dnf install lm_sensors
Officially, OpenSUSE does not carry the Lm_Sensors application. However, it should be possible to install the Fedora Linux Package.
Warning: the Fedora version of Lm_Sensors may not work on OpenSUSE Linux. Try this method at your own risk!
sudo zypper install lm_sensors-3.5.0-3.fc30.x86_64.rpm
After installing the Lm_Sensors application, the initial setup process isn’t done. Before using the app, it must be set up to work with the hardware sensors on your computer. To start the configuration process, go to the terminal window and gain root access with the su or sudo -s command.
With root available, run the sensors-detect command in the terminal, and the initial configuration process will begin.
The first screen that appears in the sensor configuration process says, “Some south bridges, CPUs or memory controllers contain embedded sensors. Do you want to scan for them? This is totally safe”. Write out “Yes” in the prompt to begin.
After selecting “YES,” the next question will appear. This question states, “Some Super I/O contain embedded sensors. We have to write to standard I/O ports to probe them. This is usually safe. Do you want to scan for Super I/O sensors?” Once again, choose “Yes” to allow Lm_Sensors to scan.
Following the two main questions, the program will ask several other ones. Say yes to the questions asked where the word “yes” is in all caps, and no to the ones where the word “no” is in all caps.
When Lm_Sensors is done asking questions, the configuration is complete.
Check CPU temperature with Lm-Sensors
Checking CPU temperature on Linux with Lm-Sensors is done with the sensors command. To quickly check the temperature readout of your CPU (and other devices that Lm-Sensors detected), open up a terminal window with Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. Then, run the sensors command to view a readout of various sensor temperatures.
Alternatively, if you’d like to save your CPU temperature readout to a text file to read for later, run the sensors command and redirect it with the “>” symbol.
sensors > cpu-temp.txt
Method 2 – Psensor
Another great way to check CPU temperatures on Linux is with the Psensor tool. It’s a graphical application that can show various sensor statistics in an easy to read interface.
Note: Psensor uses Lm_Sensors for some operations in the app. To get the most out of Psensor, follow the instructions in Method 1 to set up Lm_Sensors before following the instructions outlined below.
To start the installation of Psensor on Linux, open up a terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T. Then, once the terminal window is open, follow the command-line instructions below that correspond to the Linux OS you use.
sudo apt install psensor
sudo apt-get install psensor
sudo pacman -S psensor
sudo dnf install https://raw.githubusercontent.com/rpmsphere/x86_64/master/p/psensor-1.2.0-5.1.x86_64.rpm
There’s no package for Psensor available on OpenSUSE. Instead, try installing the Fedora Linux version but, use it at your own risk!
sudo zypper install psensor-1.2.0-5.1.x86_64.rpm
Using Psensor to check temps
The Psensor application, once installed, doesn’t need any configuration (outside of setting up Lm_Sensors). To check the temperature of the CPU on your computer, open up the app, and look to the column on the right for CPU temperature information.
Source = “https://www.addictivetips.com/ubuntu-linux-tips/check-cpu-temperature-on-linux/”