If you’re a PC nerd, you no doubt worry about the temperatures that various components output while in use. Even if you are not a nerd, you may also be concerned about the loud noise made by the CPU fan and the sudden surge in your laptop temperature.
For Windows users, monitoring temperatures is as easy as installing one of the many, many temperature monitoring programs available. On Linux, user’s aren’t as lucky. If you’re interested in temperature monitoring, you’ll need to use a program called lm-sensors. It’s a terminal based program that can be configured to monitor the temperatures (as well as having a lot of other uses) of several different components in your machine.
Installing lm-sensors on Linux
Before you can use lm-sensors, you’ll need to install it. For Ubuntu, just open up a terminal window (you’ll be using it a lot in this guide) and enter the following command.
Not on Ubuntu? Don’t worry! Chances are, this program can be found in your Linux distribution’s software repository. Just open up your package management program and search for lm-sensors and install it.
Setting up lm-sensors on Linux
Now that you have the sensors program installed on your system, it’s time to set it up. You’ll be asked many, many questions during the setup process. It’s safe to just go with all of the default answers to the questions. Only deviate from this if you specifically know what you are doing with lm-sensors.
To start answering questions, enter the command below into your terminal window.
Note: sensors-detect must be run with sudo
Sensors-detect will run through and set itself up, asking you questions about what you’d like to monitor. This includes CPU, GPU and just about anything in between.
Checking temps with lm-sensors
Checking your temperatures is fairly simple. All you’ll need to do is open up a terminal window, and enter:
This command will output temperature information in the Celsius temperature format.
Not a fan of Celsius? That’s perfectly fine! It’s also possible to get temperature readings in Fahrenheit. Just enter
into your terminal instead of the other command.
Monitoring temps with lm-sensors
Checking temps with the sensors command is fine if you want to just get an idea of what your temperatures are real quick. Still, it can be annoying entering that command repeatedly if you’re trying to persistently monitor your temps, meaning if you are monitoring them and watching the fluctuation in action.
Not to worry! There is another command specifically created for you to enter to monitor temperatures. Just enter this command into your terminal window.
You’ll be able to exit watch sensors by simply pressing “Ctrl + z” on your keyboard. Alternatively, exit by closing the terminal window altogether.
Monitor your temps with a GUI using Psensor
Lm-sensors certainly is a very impressive tool, but it’s for the command line. This does no good for users that still want to monitor their temps on Linux, but aren’t so happy using the terminal with everything.
Enter Psensor. It takes lm-sensors and creates an impressive tool around it. With it you can monitor everything temperature-related (CPU and motherboard sensors), as well as fan speeds, GPU temps and more all with an easy-to-read GUI program.
Along with making use of lm-sensors, Psensor also makes use of XNVCtrl to tell you the temperature of Nvidia GPUs, hddtemp or alternatively libatasmart to report hard drive temperatures and even CPU usage.
If you are looking for a good GUI tool to monitor all of the things mentioned above, Psensor should be your first stop. Here’s how to install it on Ubuntu.
Are you using something other than Ubuntu? Chances are, this program is available in your Linux distribution’s software repository. Just open your package manager and search for psensor and install it.
Conclusion
Though temperature monitoring sounds like the most boring thing in the world, it’s actually very important. Without the ability to check temps, how would we know the health of the components in our machines?
I hope that with the help of this guide you’ll become a master of lm-sensors.
How do you check your temps on Linux? Do you prefer to monitor them or check in with them from time to time? Tell us in the comments below!
Derrik Diener is a freelance technology blogger.
Our latest tutorials delivered straight to your inbox