Want to check the CPU temperature in the Ubuntu terminal?
Well, there are multiple tools to do so and in this tutorial, I will introduce 4 such tools to check CPU temperature in an Ubuntu terminal:
So let's start with the first one.
1. Using the lm-sensors utility
By far this is the most popular utility to check the temperature in Linux and serves as a backend for so many GUI utilities that lets you check CPU temps.
Being super popular, lm-sensors is available in the default repository of Ubuntu and can easily be installed with the following command:
sudo apt install lm-sensors
Once done, use the following command to detect the sensors of your system:
After you execute the above command, it will ask you several questions for various adapters whether you want to check their temperature or not.
I would recommend going with the default opinions (press the
Enter key for that):
Now, you can execute the
sensors command to check the temperature:
2. Using the Glances utility
Glances does much more than just checking the CPU temperature.
It is more of an alternative to htop and lets you monitor network, memory utilization, and much more.
Like lm-sensors, glances is available in the default repository of Ubuntu and can be installed with the following command:
sudo apt install glances
Once done, start the glances utility:
3. Using the hardinfo utility
The hardinfo is a lightweight benchmarking utility and being a benchmarking utility, it is a no-brainer that you can also use it to check CPU temperature.
To install hardinfo in Ubuntu, use the following command:
sudo apt install hardinfo
Once done, execute the following command to
hardinfo -rma devices.so
4. Using the i7z utility
The i7z utility provides detailed information about the Intel i3, i5, and i7 processors including the CPU temperature.
To install i7z, all you have to do is execute the following command:
sudo apt install i7z
Once done, start the i7z utility to display CPU temperature:
(give it a few seconds and soon you'll see live temperature):
Pretty easy. Right?
If interested, you can learn about getting more details about the CPU on your Ubuntu system.
This was a quick tutorial showing multiple ways to check the CPU temperature in the Ubuntu terminal in the least complex way possible.
I hope checking CPU temperature is no longer a complex task for you.