Laptops usually face thermal issues due to their compact space, providing less area for airflow than recommended. However, there are other factors involved, like running resource-heavy applications in low-end systems or still using the old hardware system.
It can be disastrous to ignore the temperature details, which might put your system in danger and your body in close contact with your system (laptop) due to thermal fire.
Linux provides some third-party CLI/GUI applications to monitor your CPU thermal temperature, which we are about to learn.
Method 1: lm-sensors [CLI]
lm-sensors is a simple command-line utility to output the current reading of all sensor chips in your system. However, Linux distributions do not pack this tool with the operating system.
To install lm-sensors, open the terminal by pressing Ctrl + Alt + T or Ctrl + Shift + T keyboard shortcut keys, and then use any of the below commands depending upon your Linux distribution.
Debian-based distros such as Ubuntu provide a hand-on method to install lm-sensors using the apt package manager as shown below.
$ sudo apt install lm-sensors
RHEL-based distro users can install it using the current DNF package manager as shown below.
$ sudo apt install lm_sensors
Users of Arch-based systems can easily install it on their system using the default pacman package manager as shown below.
$ sudo pacman -S lm_sensors
After the installation is complete, you need to execute
sensors-detect command to scan your system for various hardware monitoring chips, or sensors, supported by libsensors.
Ensure all the drivers for the sensors are present in your current system before executing the below command.
$ sudo sensors-detect
The above command will ask for (YES/no) to look for the below devices in order to generate the report.
- Sensors are embedded in CPUs, south bridges, and memory controllers.
- Sensors embedded in Super I/O chips.
- Hardware monitoring chips are accessed through ISA I/O ports.
- Hardware monitoring chips are reachable over the SMBus or, more generally, any I2C bus on your system.
Other than the above, there are a few more detection steps that can cause some issues. They are usually not attempted if the second step super I/O chip is detected, providing complete hardware monitoring features. It recommends pressing YES if it is in capital letters and NO if it is in capital letters.
If you are not interested in interactive mode to generate the report, then you can use the
--auto option to run the detection in automatic mode as shown below.
Note: Automatic mode isn’t recommended because it doesn’t know which chips are there before it recognizes them. This might discomfort the chips, causing problems like SMBus lockup and permanent hardware damage. However, the author did his best to make the detection as safe as possible.
$ sudo sensor-detect --auto
Check CPU Temperature with lm_Sensors
Checking CPU temperature requires executing the
sensors command, which provides all the temperature information for chips and sensors in the system as shown below.
Below is the behavior of the above command.
If you want to monitor changes in the temperature for a while without executing the same command repeatedly, then use watch command with sensors commands as shown below.
$ watch sensors
However, you can also save the output in a text file and read it later. Use the below command to redirect the output of the
sensors command to the
$ sensors > temp.txt
Method 2: Psensor [GUI]
Psensor is another great GUI-based tool to monitor CPU temperature and display statistics for you to make it easy to find patterns in temperature changes.
To install Psensor, open the terminal by pressing Ctrl + Alt + T or Ctrl + Shift + T keyboard shortcut key and then execute the below command.
$ sudo apt install psensor
After the installation, execute the below command to display the current CPU temperature on your system.
That’s all for now. If you have any more tools in your hand to share, then let us know in the comment section.
Innovative tech mind with 12 years of experience working as a computer programmer, web developer, and security researcher. Capable of working with a variety of technology and software solutions, and managing databases.