How to monitor your computers temperature in Linux
This is really useful in case your computer shutdowns without any warning.
I had this issue with one of my computers lately and I just didn’t know what the cause was.
It simply overheated and because of the high temperature it automaticly shutdowned.
I managed to fix this by cleaning up all the dust in it and adding another fan.
I said Ok … glad I fixed it … but what can I do to prevent it again ? I lost a lot of unsaved work because of the unexpected shutdowns.
Most of the computers these days have built in sensors for monitoring the temperature. Of course you can view the temperature in BIOS … but hell … why restart your computer every time you want to see how HOT it is
?
Being an Ubuntu user and fan I will show you how you’re able to view how your computer is doing.
First of all you need to install the libraries that allow Ubuntu to read your sensors. To do this, install the lm-sensors library, by running the command:
sudo apt-get install lm-sensors
This will install the libraries needed for your motherboards sensors.
You can also install the libraries for your hard drives.
sudo apt-get install hddtemp
This installer is a little tricky. Just make sure you answer YES to all of the questions. Also don’t edit anything, leave the default values there.
Now that you succesfully installed the libraries you need to search for your sensors. As everything in Ubuntu, this is simple as hell. Just run the command:
sudo sensors-detect
Make sure you answer YES to all of the questions. Don’t type in just Y, type in only YES.
Since we answered YES to the previous question, our sensor modules will be loaded by default the next time we start up. But since we don’t want to have to reboot, we’re going to use the information we got from the sensors-detect script to load the modules ourselves, this time only. Right above the last question will appear a list of modules that you should load, in the form of:
#—-cut here—-
# Chip drivers
it97
#—-cut here—-
it97 in just in my case so I used the following command:
sudo modproble it97
Make sure you run the command with the right module name.
Don’t worry if nothing appeared … this means that everything went well.
You can monitor the sensors by typing in in your terminal:
sensors
Of course this will output the temperatures in a text enviroment.
To have a visual on how hot your computer is you can just install the sensors applet:
sudo apt-get install sensors-applet
Now that you also installed the applet you can add it to any of your panels.
I chose my bottom panel.
Right click on the panel, click on Add to panel and search for Sensor.
You will see the Hardware Sensor Monitor there. Just add it.
Customizing the sensor monitor
Just right click on Sensor applet and go to Preferences. This windows should appear:

You can choose between Celsius, Kelvin and Fahrenheit for the temperature and of course if you want graphs or icons. Try all of them before deciding.
Now … on the Sensors tab you can choose which temperatures to monitor and show in the panel.
In my case :

you can see that I chose to display my mother-boards temperature and the CPU temperature.
As you can see I also chose to see how my fan is doing.
A little higher I also chose to display the temperature for my HDD also.
Here’s how my sensor applet looks like after I finished:
![]()
From left to right.
- My HDD Temperature: 40 degrees C
- My fan: 2909 rotations per minute
- Motherboard temperature: 40 degrees C
- CPU temperature: 30 degrees C
Hope you enjoyed reading this and find it useful.
One Response
to “How to monitor your computers temperature in Linux”
Leave a Reply















Thank you
i will install it