How do I get the CPU temperature?
21 Answers
Install lm-sensors
sudo apt-get install lm-sensors
After installation type the following in terminal
sudo sensors-detect
You may also need to run
sudo service kmod start
It will ask you few questions. Answer Yes for all of them. Finally to get your CPU temperature type sensors in your terminal.
sensors
Output:
$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +41.0°C (high = +78.0°C, crit = +100.0°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +41.0°C (high = +78.0°C, crit = +100.0°C)
w83627dhg-isa-0290
Adapter: ISA adapter
Vcore: +1.10 V (min = +0.00 V, max = +1.74 V)
in1: +1.60 V (min = +1.68 V, max = +1.44 V) ALARM
AVCC: +3.30 V (min = +2.98 V, max = +3.63 V)
VCC: +3.28 V (min = +2.98 V, max = +3.63 V)
in4: +1.85 V (min = +1.66 V, max = +1.11 V) ALARM
in5: +1.26 V (min = +1.72 V, max = +0.43 V) ALARM
in6: +0.09 V (min = +1.75 V, max = +0.62 V) ALARM
3VSB: +3.30 V (min = +2.98 V, max = +3.63 V)
Vbat: +3.18 V (min = +2.70 V, max = +3.30 V)
fan1: 0 RPM (min = 10546 RPM, div = 128) ALARM
fan2: 892 RPM (min = 2136 RPM, div = 8) ALARM
fan3: 0 RPM (min = 10546 RPM, div = 128) ALARM
fan4: 0 RPM (min = 10546 RPM, div = 128) ALARM
fan5: 0 RPM (min = 10546 RPM, div = 128) ALARM
temp1: +36.0°C (high = +63.0°C, hyst = +55.0°C) sensor = diode
temp2: +39.5°C (high = +80.0°C, hyst = +75.0°C) sensor = diode
temp3: +119.0°C (high = +80.0°C, hyst = +75.0°C) ALARM sensor = thermistor
cpu0_vid: +2.050 V
To see HDD temperature Install hddtemp
sudo apt-get install hddtemp
Output:
$ sudo hddtemp /dev/sda
/dev/sda: ST3160813AS: 34°C
Quick command-line solution; shows temperature in millidegrees Celsius (m°C)
cat /sys/class/thermal/thermal_zone*/temp
Applet
If you are looking for a easier-to-access version, add a Hardware Sensors Monitor to Gnome-Panel:
sudo apt-get install sensors-applet- this will install the sensors-applet packageRight-click the panel, select
Add to panel..., then select this:You're done. You can configure which sensors are displayed by right-clicking the applet and selecting
Preferences->Sensors.
A good indicator for monitoring temperature, fan speeds and voltage is psensor. It shows output of all sensors, draws graphs. Also selected outputs can be placed in indicator panel.
It can be installed from Ubuntu repositories by typing:
sudo apt-get install psensor
Newer versions of psensor can be installed from ppa:
sudo add-apt-repository ppa:jfi/ppa
sudo apt-get update
sudo apt-get install psensor
It can also draw graphs when you tick the boxes in the graph column:
Here is some information with more pictures.
In some cases not all sensors are displayed. Then you can run
sudo sensors-detect
and answer "yes" to all questions. But is not quite safe in some cases, but I never had any real problems with that. A safer way is to take default answers.
Some additional sensors may appear.
Temperature without third-party apps
At the time of writing, all the answers involve use of third-party utilities. If you want to find out the temperature without installing anything, use:
$ cat /sys/class/thermal/thermal_zone*/temp
20000
53000
50000
53000
56000
68000
49000
50000
To see what zones the temperatures are referring to use:
$ paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t | sed 's/\(.\)..$/.\1°C/'
INT3400 Thermal 20.0°C
SEN1 45.0°C
SEN2 51.0°C
SEN3 57.0°C
SEN4 59.0°C
pch_skylake 77.5°C
B0D4 50.0°C
x86_pkg_temp 51.0°C
The temperatures are stored in Celsius with 3 implied decimal places. sed is used to "prettify" output.
The last temperature is x86_pkg_temp reported at 54.0°C. For the Skylake i7 6700HQ CPU, I used this temperature for Conky display below.