Wondering how you can check the CPU and HDD temperature in Ubuntu and other Linux on your desktop or laptops? Here’s a quick guide.
You do not actually require checking CPU or HDD temperature if you are an average user. But, if you are using a very older hardware or a thin one, you may run into overheating problem. Because these thin ones are tightly coupled together inside and no matter how much heat transfer mechanism implemented, it heats up. Therefore, it is essential to monitor the temperature of the hardware. However, modern Linux distributions are well capable of handling overheating situations via software sensors.
Steps for monitoring CPU and HDD temperature on Ubuntu
We are going to use couple of packages to achieve the same. Open a terminal in your Ubuntu based system and install the following.
sudo apt install hddtemp
sudo apt install lm-sensors
The hddtemp utility gives you the temperature of your optical hard disk drive as well as SSD (as per my test). And the lm-sensors package gives you temperature details from the CPUs and other sensors accessed via PCI ports.
After installation, run the following from terminal. You need to know your disk identifier for this – for example /dev/sda or /dev/sdb, etc.
To find out the disk identifiers, you can use fdisk.
sudo fdisk -l
Then run below to check the HDD or SSD temperature.
Checking the CPU temperature and other information requires an additional step. First, run the below command so that the sensors utility can detect the sensors in your system
The above command might ask you some YES/NO question. Keep pressing ENTER to choose the default options.
Once done, run the below command to view the CPU and other interface temperatures.
Using GUI tools
If you prefer a nice GUI which does all the above, you can install psensor. This utility works across Linux systems such as Ubuntu, Fedora, Arch and other variants. This gives you nice graphical plus tabular view of
Ubuntu and its derivatives
sudo apt install psensor
Fedora and RPM based derivatives
sudo dnf install psensor
Arch, Manjaro and similar derivatives
pacman -S psensor
Once installed, run via psensor from terminal or launch it from application menu.
As you can see in the below screenshot, it gives you a nice view of all the important temperatures across CPU, GPU, HDD with a nice graph. Using its preferences, you can tweak it as per your need. This lightweight utility can be helpful in many cases.
So, these are some ways with which you can monitor CPU, GPU or HDD temperature in your Ubuntu and other Linux systems. Let me know if you know any other ways to find these out using the comment box below.