Go to advanced search

by aduen
Tue May 05, 2020 11:50 am
Forum: Ubuntu
Topic: [ubuntu] Getting CPU tempature on Ubuntu
Replies: 13
Views: 12249

Re: [ubuntu] Getting CPU tempature on Ubuntu

For the bash aficionados:

Code: Select all

#!/bin/bash

temp=$(</sys/class/thermal/thermal_zone0/temp)

temp_f=`echo "$temp/1000" | bc -l`
printf "CPU Temp: %.3f°C\n"  $temp_f
>> CPU Temp: 40.407°C

Go to advanced search