Get CPU and GPU Temps in Linux

Get CPU and GPU Temps in Linux

To get CPU and GPU temps in linux you need to install and configure lm-sensors. With lm-sensors you can monitor cpu and gpu temperatures and fan speeds as well as voltages for some systems. Lm-sensors reads the available sensors on your motherboard, cpu, and gpu and displays their output. Once configured, you can use the command line or a GUI to monitor your system’s sensors.

Setup lm-sensors

First install lm-sensors by running the following command in your terminal.

sudo apt install lm-sensors

Once the installation completes you will need to setup lm-sensors. It’s a straightforward process. Just run the following command in terminal and follow the instructions you see in the terminal.

I always say yes to all the questions asked during the setup. You can always run this command again if you’d like to change anything.

sudo sensors-detect

When the setup is complete you can run this next command to get your cpu and gpu temperatures and fan speeds along with data from any other sensors detected.

sensors

The output from this command will look similar to this:

gametheory@ubuntu:~$ sensors
thinkpad-isa-0000
Adapter: ISA adapter
fan1:        2982 RPM

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +49.0°C  (high = +87.0°C, crit = +105.0°C)
Core 0:        +49.0°C  (high = +87.0°C, crit = +105.0°C)
Core 1:        +48.0°C  (high = +87.0°C, crit = +105.0°C)

If the command line is not your thing and you prefer a GUI to monitor your system’s sensors, then you can install xsensors. Xsensors is a gui front-end for lm-sensors.

To install xsensors just run the following command:

sudo apt install xsensors
Get CPU and GPU Temps in Linux

Another gui that I always install in linux is “System Profiler and Benchmark” which displays the data from your system’s sensors and a wealth of other system info. To install it, run the following command.

sudo apt install hardinfo
Get CPU and GPU Temps in Linux

Conclusion

This wraps up our look at getting cpu and gpu temps in linux. Whether you prefer a gui or the command line, lm-sensors is easily the best tool for probing your system’s sensors.

If you have other GUI suggestions, feel free to let us know in the comments below.

Tags: tutorials, linux, command line
· More Articles ·

Show Comments 🗨