How to Check CPU and HDD Temperature in Ubuntu and Other Linux

2 min


Wondering how you can check the CPU and HDD temperature in Ubuntu and other Linux on your desktop or laptop? 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 very older hardware or a thin one, you may run into an overheating problem. Because these thin ones are tightly coupled together inside, and no matter how much heat transfer mechanism is 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

Using terminal

We are going to use a 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 the 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.

sudo hddtemp
HDD or SSD Temperature from terminal
HDD or SSD Temperature from terminal

Checking the CPU temperature and other information requires an additional step.

First, run the below command so that the utility of the sensor can detect the sensors in your system.

sudo sensors-detect

The above command might ask you some YES/NO questions. Keep pressing ENTER to choose the default options.

Once done, run the below command to view the CPU and other interface temperatures.

sensors
using sensors
using sensors

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 the terminal or launch it from the application menu.

As you can see in the below screenshot, it gives you a nice view of all the important temperatures across CPU, GPU, and 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.

psensor running
psensor running

So, these are some ways in which you can monitor CPU, GPU or HDD temperature in your Ubuntu and other Linux systems. Let me know if you know of any other ways to find these out using the comment box below.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments