How to get CPU temperature in Ubuntu system?

In a Linux system , knowing the hardware temperature is very important. Especially for high-load scenarios such as servers and workstations, knowing the temperature of the CPU can help administrators discover and resolve system faults in a timely manner, improving system stability and reliability. In the Ubuntu system, obtaining the CPU temperature is a relatively basic operation, but it may be difficult for novices. Therefore, this article will introduce how to get the CPU temperature in the Ubuntu system.

Use Lm_Sensors to detect cpu temperature

Lm_sensors is a command- line tool to display current readings of all chip sensor data, including CPU temperature. By default, Ubuntu LInux does not have Lm_Sensors installed, therefore, we have to install them ourselves.

bob@bob-PC:~$ sudo apt install lm-sensors

Detect hardware

Next, we need to detect the hardware monitoring chip installed on the computer. Now we can start detecting the computer's hardware sensors:

bob@bob-PC:~$ sudo sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)# System: VMware, Inc. VMware Virtual Platform [None]# Board: Intel
 Corporation 440BX Desktop Reference Platform# Kernel: 4.15.0-30Ubuntu-generic x86_64# Processor: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz (6/158/

Guess you like

Origin blog.csdn.net/shengyin714959/article/details/130911156