Welcome to Raspberry Pi 4B repository
2.7 Get Pi temperature
1. We need to enter the command shown below at the command terminal:
cd /sys/class/thermal/thermal_zone0
2.We need to enter the command shown below at the command terminal:
cat temp
Raspberry Pi return value
51540
The return value is divided by 1000 for the current CPU temperature value. That is, the current temperature is 51 ℃
As shown below.