Get CPU and GPU Tempetature in Linux

To be able to get the CPU and GPU temperature on Linux, you need to install and configure the lm-sensors. Using the lm-sensors, you can monitor the CPU and GPU temperature and fan speed, as well as the voltage of some systems. lm-sensors reads the sensors available on the motherboard, CPU and GPU and displays their output. After the configuration is complete, you can use the command line or GUI to monitor the sensors in the system.

Install and Configure lm-sensors 

Lets install lm-sensors by issuing the following command in our terminal.

#for debian based distros
sudo apt install lm-sensors

#for arch based distros
sudo pacman -S lm_sensors

After the installation is complete, you will need to configure the lm-sensors. This is a simple process. Just run the following commands in the terminal and follow the instructions you see in the terminal.

Say yes to all the questions asked during the setup like i do. 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 should look something like this

sombii@sombex ~
❯ sensors
acpitz-acpi-0
Adapter: ACPI interface
temp1:        +41.0°C  (crit = +126.0°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +41.0°C  (high = +76.0°C, crit = +95.0°C)
Core 0:        +40.0°C  (high = +76.0°C, crit = +95.0°C)
Core 1:        +41.0°C  (high = +76.0°C, crit = +95.0°C)

This is the command line version, and if you are a GUI guy try the following GUI tools.

Install xsensors (GUI) by issusing the following command.

#for debian based distros
sudo apt install xsensors

#for arch based distros
sudo pacman -S xsensors

Now run the tool from launcher or application menu. And you will get something like below.

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.

#for debian based distros
sudo apt install hardinfo

#for arch based distros
sudo pacman -S hardinfo

Look for "System Profiler And Benchmark" on your application menu/launcher (not hardinfo) and run it.

Hoping that you got to lean something new and were able to achieve what you were trying to, if not please let me know in the comments. Have a nice day, good bye.

2 Comments

  1. Ramas cargo is one of the best Cargo service company in UAE. Our cargo experts help you with every step, from the first stages of planning to the final delivery to Pakistan. It is our job to ensure that your goods arrive on time. In addition, we specialize in providing Cargo To Pakistan Door To Door delivery with the best and most fast service possible. We take great care of your valuables while they are in our care. In addition, we ship your Cargo to Pakistan from Dubai safely and damage-free. We benefit from preferential treatment regarding space allocations because of our strong ties with cargo partners


    Dubai to Pakistan Cargo Service

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
Previous Post Next Post