How to Monitor Your PC’s Temperature on Linux Using lm-Sensors

How to Monitor Your PC's Temps on Linux Using lm-Sensors

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 asks you questions about what you'd like to monitor.

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

Open up a terminal window, and enter sudo 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.

You can also get temperature readings in Fahrenheit.

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 can exit watch sensors by pressing ctrl + z.

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.

Monitor your temps with a GUI using Psensor

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.


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 Derrik Diener

Derrik Diener is a freelance technology blogger.


  1. Good article, good programs. I’m glad you included the psensor, it makes the whole deal so much easier to monitor.
    But if you’re not a geek the numbers don’t mean a helluva lot.
    I’d like to see a reference chart or article added to list the temps/speeds that are optimal and what are too high for each piece of hardware.

    1. That ref. chart would be black-art. Too many things to consider. Generally speaking though, you should not let AMD CPUs stay over 50°C for too long. Intel tends to be tougher, but if it slips above 70°C, and stays there you should start to worry.

      Video cards are a different kind, they tend to heat up, especially those that have no active cooling. If you have a video card problem, you will know though (no display, etc.), so whatever you see now as it1s working, could be considered a norm. :)

      Hope this helps.

  2. 2 suggestions:

    Setting up i2c properly in /dev before running sensors-detect will allow it to have many more sensors detected.

    Try sudo modprobe i2c-dev it should work on most Debian derivatives (Ubuntu and its kin)

    The other thing is, you should manually load the suggested kernel modules, before you can run sensors, if you do not want to reboot your system. Probably easier to just reboot, but only if you allowed sensors-detect to edit the modules file automatically. In either case, it is a necessary step, before sensors could return a sane output.

    Good piece, BTW. :)

Comments are closed.