Looking For Anything Specific?

How to Check CPU Temperature on a Linux System

Want to check your CPU temperature to monitor your computer's health and prevent severe component damage? Maybe your Linux system has been overheating and you want to detect which hardware unit is causing the issue.

This article will explain why CPU temperature monitoring is important and how to check CPU temperature on a Linux machine.

Why Should I Monitor My CPU Temperature?

CPU or the Central Processing Unit is the main component of a computer system responsible for processing the data. The temperature of the CPU solely depends on the processes and applications running on your operating system. Overheating, in general, can cause instability and unexpected shutdowns.

If not given enough attention, an overheated CPU can cause permanent damage to your computer system, forcing you to change specific components or replace the entire computer.

How to Check CPU Temperature on Linux

Several applications are available on a Linux system that display intricate details of the CPU. You will be able to check your CPU's temperature using such utilities.

Get Hardware Information Using Glances

Glances is a cross-platform real-time system monitoring tool written in the Python language. This application provides information using the psutil library on Linux. Apart from CPU-related data, you can also check Load Average, Memory, Network interfaces, Disk I/O, file system, and processes.

You can install Glances on your Linux machine using either curl or wget:

curl -L https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh | /bin/bash
wget -O- https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh | /bin/bash

The auto-install script doesn't support some specific distributions like Manjaro Linux. Luckily, Glances is also available as a snap package on SnapStore.

sudo snap install glances

After installing the package, start the utility by typing glances in your system terminal.

Glances will start displaying system-related information in real-time. Press the S key on your keyboard to toggle sensor details.

Analyzing Sensor Information Using the sensors Utility

Another tool to get CPU temperature on Linux is sensors. Sensors is a command-line utility that displays sensor chip readings in real-time. While some distributions such as Ubuntu ship with sensors preinstalled, it can be installed on other distros as well using the default package manager.

On Debian-based distributions:

sudo apt-get install lm-sensors

To install sensors on Arch-based distributions:

sudo pacman -S lm_sensors

On Fedora and RPM distributions:

sudo dnf install lm_sensors

Once the package is installed, run the following command to detect sensor chips present in your system.

sudo sensors-detect

Run the application by typing sensors in your system terminal. You will get hardware information on your computer's CPU temperature.

Related: PC Operating Temperatures: How Hot Is Too Hot?

Display CPU Temperature Using HardInfo

As the name suggests, HardInfo is a simple Linux utility used to gather hardware information including the CPU temperature.

You can install HardInfo on Debian-based OSes using apt:

sudo apt install hardinfo

On Arch-based distros:

sudo pacman -S hardinfo

To install on Fedora and RPM:

sudo dnf install hardinfo

After installing the package, you can view the hardware information using the following command.

hardinfo -rma devices.so

In the output, scroll down to the Sensors section to get complete information on the CPU temperature.

HardInfo is also available as a GUI app. To launch the GUI app, go to the Applications Menu and click on the HardInfo icon.

Alternatively, you can type hardinfo in the terminal to start the application.

Get CPU Information With i7z

If your computer runs on an Intel processor, then i7z is probably the best command-line utility to get temperature-related information about your system.

You can easily install i7z on Debian using apt.

sudo apt install i7z

On Fedora and RPM:

sudo dnf install i7z

To install i7z on Arch-based Linux distributions:

sudo pacman -S i7z

In your system terminal, type sudo i7z and press Enter to launch the utility. Detailed CPU information including temperature, number of cores, frequency, etc. will be displayed.

Increasing the Life of Your Linux Machine

Maintaining an appropriate CPU temperature can have a positive effect on your system's health. Many a time, overheating can even lead to fire and explosion in your cabinet, not to mention the damage caused to the components in the process.

You can prevent overheating on your system to some extent. But in the long run, having a proper cooling system and ventilation is the most suitable choice.


Post a Comment

0 Comments