Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I get the CPU temperature.

share|improve this question
add comment

4 Answers

up vote 56 down vote accepted

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 module-init-tools start

It will ask you few questions.Answer Yes for all of them.Finally to get your CPU temperature type sensors in terminal.

sensors

Output:

karthick@Ubuntu-desktop:~$ 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 hddtmp

sudo apt-get install hddtemp

Output:

karthick@Ubuntu-desktop:~$ sudo hddtemp /dev/sda        
/dev/sda: ST3160813AS: 34°C
share|improve this answer
1  
I've often found that a) I don't need to run sensors-detect, they're just there automatically and b) if I do, I need to run it as sudo. –  Scaine Dec 2 '10 at 8:42
    
Edited to echo @Scaine's comment and also to install hddtemp instead of hddtmp. –  Oli Dec 2 '10 at 9:45
    
This doesn't work on all hardware. On my system, sensors always shows a temperature of +40.0°C. –  Keith Thompson Sep 6 '12 at 18:53
4  
On my 13.04 system, it's sudo service kmod start instead of sudo service module-init-tools start –  knb Jul 10 '13 at 6:51
2  
You can run watch sensors to see temperature values updating each second. –  Drew Noakes Aug 3 '13 at 21:09
show 1 more comment

Quick command-line solution

cat /proc/acpi/thermal_zone/THRM/temperature.

Applet

If you are looking for a easier-to-access version, add a Hardware Sensors Monitor to Gnome-Panel:

  1. sudo apt-get install sensors-applet - this will install the sensors applet package
  2. Right-click the panel, select Add to panel..., then select this: alt text

  3. You're done. You can configure which sensors are displayed by right-clicking the applet and selecting Preferences->Sensors.

    alt text

share|improve this answer
1  
Your command-line solution may not work for all.Because the path will be different for every kernel version. –  karthick87 Dec 2 '10 at 10:02
1  
Yeah it didn't work for me. –  fluteflute Jun 1 '12 at 14:17
1  
My Ubuntu 12.04 system has no /proc/acpi/thermal_zone/THRM/temperature; in fact there's nothing under /proc named temperature. –  Keith Thompson Sep 6 '12 at 18:56
5  
Thats because '/proc' is deprecated; try '/sys/class/thermal/thermal_zone0/temp' –  mathepic Jul 15 '13 at 19:03
1  
+1 for quick command line option. Answer would benefit from adding more info about it (@mathepic comment and info about other paths possible). –  LIttle Ancient Forest Kami Jul 15 '13 at 20:00
add comment
  1. install the small package of apci by this command

    sudo apt-get install acpi
    
  2. You will need to press Y for confirmation for the first time. Now to find temperature type this command

    acpi -t
    
share|improve this answer
1  
This is simpler than the answers about lm-sensors. Could you explain the difference between acpi and lm-sensors? –  BornToCode Jan 23 at 23:24
add comment

computertemp is a simple applet that shows your current cpu temp + has some addidional features like alarms. Unfortunately it's not possible (or at least I don't know how) to change its background color, so it doesn't look very nice with the standard Ubuntu theme.

It can be installed the same way as the sensors-applet described in evgenys answer.


alt text

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.