Device temperature control has proven to be very vital for any user’s machine. Unfortunately, most of the time, your PC or laptop gets too hot because the diverse parts and components of the laptop are closely coupled together. This is evident in small/slim laptops as there seems to be little space for airflow between the laptop components. With the reduced airflow in your system, the heat can harm the physical components of the PC.
The Central Processing Unit (CPU), a latency-optimized general-purpose processor designed to handle a wide array of distinct tasks sequentially, or Graphics Processing Unit (GPU), a throughout-optimized specialized processor designed for high-end parallel computing, depends entirely on the usage of running programs or applications. Sensitive computer elements such as CPUs have a finite lifespan, and running them at a temperature that exceeds a specific limit can shorten their lifespan. It can additionally cause thermal throttling, especially in cases where the fan is not providing adequate cooling.
Believe it or not, it is essential to monitor your system’s CPU temperature to avoid damages due to overheating. This tutorial will highlight and share some valuable tips on installing temperature sensor packages on elementary OS and any other Debian-based distros. To emphasize, we will look at the command line method and conclude with the GUI method of CPU and HDD temperature monitoring.
Monitoring the hard disk and CPU temperatures on elementary OS
Step 1: Update system
As usual, we will first update our system for a proper installation of the temperature sensors. After updating our system, in some cases, you might find your system with several packages that need to be upgraded. If that is the instance, then you need to update and upgrade your system as follows:
sudo apt update
Immediately after you run the update command, the system will prompt you to input your sudo password for the apt update to start. So after keying your password, press “Enter” to proceed.
Note: During the installation process, you will be queried, “Do you want to continue?” So, type “Y” or “y” and press “Enter” to proceed with the update process.
Step 2: Update error
In some cases, you might trip into some third party errors while updating apt; if that is the case, run the following command to fix the missing package:
sudo apt upgrade –fix-missing
Upon running the commands, be patient for a while for the system to update. After that, run the upgrade command:
sudo apt upgrade
Without further ado, we will start by looking at how to monitor the CPU temperature.
CPU temperature monitoring
In a Linux OS, the sensor instruction monitors the current sensor chips and CPU temperature. So, in this case, you need to counter-check the already configured sensors on your elementary system. For this course, we will make use of the following command to achieve this:
Upon running the command, you should see information regarding system adapters, chips, and CPU temperature. As you can see, it is clear that our elementary system lacks sensors. So we will go ahead and install the sensors into our system.
To check for the temperature of HDD, SSD, and CPU, you need to install some hddtemp package and ls-sensor package. So, it would be best to look for sensors compatible with your system using the following commands separately.
apt-cache search lm-sensors
The above command will show all the available lm-sensors packages and their specifications in the image.
Now, to search for the attuned/compatible hddtemp packages for your system, run the following command, and you should see the available hddtemp package and its specifications.
apt-cache search hddtemp
The two listed commands will only display the available lm-sensors and hddtemp, respectively, without being installed in your system. Better still, we have made this easier for you as we will break down the installation steps of the two features for you.
How to install lm-sensors and HDDtemp in elementary OS
After a successful apt update, you need to install lm-sensor and HDDtemp in your elementary OS. To do this, run the following commands:
sudo apt install lm-sensors
After installing the lm-sensors, we will go ahead and install hddtemp using the following command:
sudo apt install hddtemp
Note: After running each of the two commands, you will be asked to key in the sudo password for the process to continue. So, what you do here is only enter your PC password, and the installation process will be underway.
Detect Hardware Monitoring Chips
After some time of patience, the lm-sensors will be installed on your system, and you should be able to cross-check the hardware monitoring chips that you recently installed to your elementary system using the following command:
As usual, if you run the command, you will be asked to enter your sudo password for the command to run the process. After typing your password, hit the “Enter” button, and it will affirm your action by querying you to type “Yes” or “No.” And to detect the hardware, we suggest typing “yes.”
The sensors-detect command will ensure that you can check for info concerning your elementary system’s already entrenched sensors in the CPU and hardware monitoring chips. Now add the sensor command again to help view the temperature of the CPU. Finally, if this does not work for you by any chance, try the GUI method in your elementary system.
Using GUI tools
Something interesting about the Psensor is that the new update of Psensor offers elementary OS with an applet predictor that simplifies the device’s temperature control on the elementary system and other Linux distros. On the other preview pane side, you can decide to display the device temperature levels. At any time the temperature reaches the threshold, it will give you a desktop notification update. Now, after installing and enabling lm-sensor and hddtemp, we can finally install Psensor on our elementary OS. To install Psensor, run the following command:
sudo apt install psensor
In the course of the installation, you may be asked to affirm your action by either typing Y or y to accept or N to cancel. So, type “y” to continue. Upon completion, the Psensors should be installed and ready for use in your system.
After that, navigate to the Menu bar of your elementary OS, and search for Psensor. After finding the application, click on it to open it.
Once you open it, you will see the graph displaying your CPU’s statistics in the Psensor temperature monitor window.[Are you a parent and would love to monitor your kids by enabling parental control on your kids? You can check out our other article on how to enable parental control on Kids account on the elementary OS]
To update preference, maneuver to the top menu, and click on Psensor. After that, go to the Sensor preferences and update graph settings.
Check the box next to the Active desktop notification to get notified.
Additionally, you are allowed to customize the Psensor display to your preference.
If you want to modify the units of temperature, go to the topmost menu and click on Psensor. After that, click on Preferences to update. You can either select Celsius or Fahrenheit As well.
You can also modify the graph preference as per your choice.
You can permit the different provider’s support from it as well as check-marking the provider’s packages.
How to uninstall Psensor
If you want to uninstall Psensor for any reason, then this section is for you, pal. To do this, run the following command:
sudo apt remove psensor
During the uninstallation, you would be asked to confirm the continuation of the process, type “y” or “Y,” and you should be good to go.
Apart from Psensor, here are some other useful command-line tools to aid you in keeping a close eye on the CPU and HDD temperature.
This is a cross-platform, advanced, and well-known real-time system monitoring tool that boosts functionality by using the psutil library to collect data/information from various sources.
The application can display information from sensors using the psutil and or hddtemp tools. Interestingly, the app has a web server mode that allows you to access it through a web browser to monitor your Linux server remotely.
Generally, there are various ways to install Glances on your system, but the most preferred is an auto-install script, as it installs the latest production-ready version.
To install Glances to your elementary OS, use curl or the wget command as displayed below:
curl -L https://bit.ly/glances | /bin/bash wget -O- https://bit.ly/glances | /bin/bash
Once installed, start the app by typing glances on your terminal session to view sensors information
This is a flimsy system profiler tool designed for hardware analysis and report generation. The software features comprehensive reports on system hardware and allows the creation of Hypertext Markup Language (HTML) reports on your system’s hardware.
The installation process is super easy. Run the following command:
sudo apt install hardinfo
After the installation is over, you can fire up the hardinfo to view devices’ information by running the following command:
hardinfo -rma devices.so
To launch the Graphical User Interface of the application, just run the following command
This tiny command-line utility software reports Intel Core i3,i5,i3 CPU information, including temperatures. You can have this software installed in your elementary OS via the following command:
sudo apt install i7z
Once installed, you can run the application with root privileges as displayed by the following command:
So, this was a dry run of how one can monitor their hard disk and CPU temperatures on elementary OS. First, we looked at the command-line way and the Graphical User Interface (GUI) representation of temperature monitoring. Then, on the GUI method, we installed Psensor, a customizable application feature to check CPU temperature on any Linux-based distro.
The app helps one easily measure the different temperatures of the system components to be aware of the system overheating during situations such as gaming, overclocking, or any other strenuous tasks. After that, we went further and looked at other alternatives of the psensor that you should be well versed with. To this end, we hope this article has helped cover steps to monitor hard disk and CPU temperatures on elementary OS. Thanks for reading! And in case of anything, do not hesitate to reach out.