How to get the CPU temperatur in command linux on Linux?
Posted on In QAMost modern servers or computers have sensors to detect the temperature of various components. On Linux, how to get the CPU core temperatur in command linux?
First, make sure the package “lm-sensors” is installed on your Linux and the command sensors
works for you.
Then, you can use this piece of script to get the CPU temperature:
sensors
| grep 'Core 0'
| awk '{print $3}'
| rev | cut -b4- | rev | cut -b2-