How do I get the CPU temperature?
-
6Related: hardware sensors, indicator and fan control. – Lucio May 25 '15 at 18:15
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

- 17,696

- 81,947
-
6This doesn't work on all hardware. On my system,
sensors
always shows a temperature of +40.0°C. – Keith Thompson Sep 06 '12 at 18:53 -
6On my 13.04 system, it's
sudo service kmod start
instead ofsudo service module-init-tools start
– knb Jul 10 '13 at 06:51 -
112You can run
watch sensors
to see temperature values updating each second. – Drew Noakes Aug 03 '13 at 21:09 -
27It gives warnings about being risky. Are you sure you should answer "yes" to everything? I don't think they have put those messages there for fun... – jobukkit Sep 28 '13 at 10:50
-
5
-
I notice you have problems in your computer(many ALARMS), anyway I want to ask, what are in4 in5 in6 and if the reach the maximum what does that mean ? – niceman Aug 22 '15 at 14:50
-
4
-
1The only output I get from the sensors command is the temp of the two cores. – SDsolar Jul 11 '17 at 08:49
-
13to answer yes to all sensors-detect questions, run
yes yes | sensors-detect
– hanshenrik Jan 05 '18 at 21:59 -
Ubuntu 16.04 LTS already has this installed, although the output of the
sensors
command is much more brief. – SDsolar Jun 22 '18 at 15:41 -
-
1What are recommended temperatures for components? Or rather, what temperatures should make me worried? – wes Aug 11 '20 at 21:04
-
My system froze when I answered "yes" to one of the questions (about probing various I/O ports). Anyways, it had detected correct sensors for what I had wanted already so I just answered no to everything else and it still worked fine. – Peeyush Kushwaha Sep 28 '20 at 21:36
-
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-appletpackage
Right-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
.

- 2,148

- 9,575
-
15Your command-line solution may not work for all.Because the path will be different for every kernel version. – karthick87 Dec 02 '10 at 10:02
-
3
-
3My Ubuntu 12.04 system has no
/proc/acpi/thermal_zone/THRM/temperature
; in fact there's nothing under/proc
namedtemperature
. – Keith Thompson Sep 06 '12 at 18:56 -
19Thats because '/proc' is deprecated; try '/sys/class/thermal/thermal_zone0/temp' – mathepic Jul 15 '13 at 19:03
-
2+1 for quick command line option. Answer would benefit from adding more info about it (@mathepic comment and info about other paths possible). – LAFK says Reinstate Monica Jul 15 '13 at 20:00
-
1for my 14.04 system, neither command line works (No such file or directory). – Marty Fried May 12 '14 at 04:49
-
@mathepic: why is it depracted? and is /sys/... still (like proc) containing zero-sized on-demand files? – PythoNic Jul 04 '14 at 12:55
-
Since adding panels didn't work, I went to extensions.gnome.org to find something alike. – PythoNic Jul 04 '14 at 13:49
-
This is a GNOME 2 applet, so presumably it doesn't work on Ubuntu Unity (the default) or GNOME 3. – Flimm Jan 06 '16 at 20:42
-
6what units for
cat /sys/class/thermal/thermal_zone0/temp
? Can you convert it to C/F? ... Looks like the first two digits are the first two digits preceding the decimal place and the next are those following the decimal place for Celsius. – dylnmc Feb 24 '16 at 12:33 -
1@mathepic procfs is not depreciated, using it for non-process information is. – Peter Novotnak Mar 15 '16 at 17:31
-
I got an answer
66000
running the command as given in the answer on fully updated 16.04. – Karsus Jul 16 '16 at 20:01 -
1@Peter Mortensen: Mine has
thermal_zone0
,cooling_device0
...cooling_device8
. I 'd guess it's probably the different hardware/firmware that makes the OS create these folders in different ways? (Just guessing.) – Karsus Jul 18 '16 at 20:10 -
2This work for me , but I don't understand the output. The output is :
53500
.What is the meaning of it. – alhelal Dec 12 '16 at 13:36 -
@BandaMuhammadAlHelal These guys explain it a bit more. https://www.cyberciti.biz/faq/linux-find-out-raspberry-pi-gpu-and-arm-cpu-temperature-command/ (basically your temp is 53c) – Mint Mar 05 '17 at 01:48
-
Thermal Zones 0 and 1 are often distorted on my Ubuntu 16.04 Kernel 4.4+ and only Thermal Zone 2 (invisible to
sensors
) is consistently accurate. – WinEunuuchs2Unix Mar 10 '17 at 14:03 -
This did not show up to be added in Ubuntu 16.04 LTS in July 2017. So I uninstalled it then did a sudo apt-get autoremove – SDsolar Jul 11 '17 at 08:50
-
4A more understandable output:
cat /sys/class/thermal/thermal_zone*/temp | awk '{ print ($1 / 1000) "°C" }'
– Kanchu Apr 03 '18 at 09:48 -
I tried this on CentOS 7.9, and there are no
thermal_zone*
folders under/sys/class/thermal
, only symlinks namedcooling_deviceX
, with X a number. There's no temp file under any of the folders. So this depends a lot on your distro and kernel, I believe. – fencekicker Oct 06 '23 at 15:37
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.

- 74,764

- 90,100
- 91
- 213
- 324
-
7On my Ubuntu 16.04,
psensor
will sometimes use 30% cpu, driving the temperature up. – dirkjot Nov 24 '17 at 19:17 -
1
-
-
-
1After installing this my touch pad stops working at periodic times – Rajat Verma Dec 16 '18 at 13:15
-
By default, psensor detected only two cores on a quad-core CPU. Odd. – Ray Woodcock Mar 05 '22 at 15:58
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.
Temperature with Conky
If you don't mind third-party utilities I like to use Conky--a light weight system monitor.
Conky commands
Within conky the system variable I used to monitor an Ivy Bridge CPU is:
${hwmon 2 temp 1}°C
To monitor a Skylake CPU I used:
${hwmon 0 temp 1}°C
Conky display
The conky display looks like this:
The temperature starts at 72°C with a single CPU running at 100% in turbo mode of 3200 MHz. Then turbo is switched off and temp drops 10°C to 62°C with a non-turbo speed of 2600 MHz. 10 seconds later turbo is turned back on and temperatures immediately spike back up to 72°C.
Controlling Temperature
After knowing your temperature you probably want to control it better. tlp
works wonders for keeping system under control. It works with thermald
, Intel Powerclamp, Battery vs AC for USB power, etc. Although highly configurable I've never had to change the configuration settings for a pleasant Out-Of-The-Box experience. Prior to using it I had all kinds of problems with an IvyBridge laptop overheating all the time. I have it on my new Skylake laptop and the fans NEVER run except when doing Ubuntu 16.04 LTS to 18.04 upgrade.
You can get a very detailed write-up with installation instructions here: Stop cpu from overheating

- 102,282
-
4
-
your quote says 48000 but your text says this is 57 degrees Celsius? I'm confused. – Sun Jun 13 '18 at 07:32
-
@Sun I had regenerated the one-liner using a newer processor and didn't revise the explanation properly. Fixed! – WinEunuuchs2Unix Jun 13 '18 at 10:35
-
Slight tweak to the sed command to get it to handle fractions of a degree:
sed 's/\(.\)..$/.\1°C/'
– ncoghlan Oct 15 '18 at 10:11 -
I'm wondering if there may sometimes be an extra step needed to get the kernel to actually read the board temperature sensors, as I'm currently getting 26.8 degrees for both a unit in my lab, and one out in the field, and I frankly don't believe the one in the field could be running that cool when the modem next to it is reporting a temperature of 42 degrees (similar to @Katu https://askubuntu.com/questions/15832/how-do-i-get-the-cpu-temperature/854029?noredirect=1#comment1394626_891639 here) – ncoghlan Oct 17 '18 at 03:58
-
@ncoghlan I've noticed the same thing when room temperature is 25C but sensor
INT3400 Thermal
always reports an impossible 20C. I simply ignore that sensor... – WinEunuuchs2Unix Oct 17 '18 at 10:43 -
2Thanks! And this is a bit off-topic, but how do you create a (such high-quality) GIF capturing a portion of the screen like that? – Jim Raynor Mar 26 '21 at 09:22
-
2@JimRaynor The area is called screen recording and there is a Q&A about that here: https://askubuntu.com/questions/4428/how-can-i-record-my-screen I'm using
peek
which you will find instructions for on the link. – WinEunuuchs2Unix Mar 26 '21 at 11:19 -
-
This answer scraped from Ask Ubuntu has the full configuration: https://www.pippim.com/2018/06/19/Setting-to-High-Performance.html There is also a link at the top back to Ask Ubuntu if you prefer reading on this site or want to up-vote that answer. – WinEunuuchs2Unix May 22 '23 at 21:22
hardinfo is very useful tools to get all hardware information.
Install hard info by sudo apt-get install hardinfo
. Then you can get temperature by sensors.
-
22Good looking tool, except every single page populates except Sensors (e.g. is blank)... – frumbert Mar 29 '15 at 13:07
-
15
-
-
I also like the ARP table. Pretty handy to verify what is connected to my subnet. – SDsolar Jul 11 '17 at 08:51
-
-
Works for me! Also shows me a graph in green color at the bottom. This tool is by far the best! – ablaze Jul 19 '18 at 03:03
After you install lm-sensors:
sudo apt install lm-sensors
run:
sudo sensors-detect
you can run the following command to view hardware temps:
watch -n 1 sensors
Also, the fan is usually controled by BIOS.
Another good tool is i7z
for Intel Core processors:
sudo apt install i7z
sudo i7z
and because i7z
runs like top
, there is no need to use watch
.

- 43,546
- 8
- 97
- 150
-
15i like the tip about using watch, it's one of my favorites. i also recommend adding the -d option to watch to highlight the differences. – Joshua K Dec 25 '15 at 20:05
-
This gave me 4 core temp reading on my i7-3770 on Ubuntu 16.0.4 LTS running 100% CPU (~77 degrees Celsius) – Sun Jun 13 '18 at 07:35
-
Good answer till you got to
i7z
. Maybe it's okay, but it has ruby dependencies. "The following NEW packages will be installed: fonts-lato i7z javascript-common libjs-jquery libruby libruby3.1 libyaml-0-2 msr-tools rake ruby ruby-net-telnet ruby-rubygems ruby-sdbm ruby-webrick ruby-xmlrpc ruby3.1 rubygems-integration" No Thanks. – B. Shea Dec 24 '23 at 02:24 -
-
I personally hate it, but my point was that just to get the cpu temp, it seems a overkill to install a prog that needs extras like this. I looked at the single ruby file i7z_rw_registers.rb. There was no reason I can see to use ruby for this file. (And add more dependencies and files to install). Shell, perl, python could have been used easily and are already installed. I also don't see why someone would need a gui (i see js & jquery - another big lump of code). i7z (cli) and the i7z-gui should be separate installs IMO if they have to have a gui. – B. Shea Dec 28 '23 at 15:17
install the small package of acpi
by this command
sudo apt-get install acpi
You will need to press Y for confirmation for the first time. Now to find temperature type this command
acpi -t
-
27This is simpler than the answers about
lm-sensors
. Could you explain the difference betweenacpi
andlm-sensors
? – fikr4n Jan 23 '14 at 23:24 -
4On Ubuntu 16.04, Skylake Laptop,
acpi -t
outputs nothing. It's a valid option, just doesn't work--version:acpi 1.7
. – WinEunuuchs2Unix May 25 '18 at 22:50 -
1I successfully used
acpi -t
on grml live CD system to monitor the temperature of each die of an Core i3 processor.lm-sensors
isn't preinstalled on grml and I can't install other packages there. https://grml.org/ – Daniel Böhmer Apr 08 '19 at 21:35 -
2
acpi
just fails withNo support for device type: power_supply
for me. – Steven Lu Dec 14 '20 at 20:00 -
1
XSensors
XSensors reads data from the libsensors library regarding hardware health such as temperature, voltage and fan speed and displays the information in a digital read-out.
Open the terminal and type:
sudo apt-get install xsensors lm-sensors
Then detect your computer's hardware sensors by opening the terminal and running the command:
sudo sensors-detect
Then you will get asked a lot of questions about what hardware you want the program to detect. It is generally safe and recommended to accept the default answers to all questions, unless you know what you're doing.
Xsensors vs. Psensor
XSensors and Psensor both monitor the computer's temperature and the fan speeds. The difference between the two applications is in the level of detail of the information that is displayed and how the information is displayed.
XSensors displays a little bit more specific information than Psensor. Psensor is smaller and more unobtrusive than XSensors and it displays itself on the desktop as a little thermometer icon in the notification area in the upper right corner of the desktop. You can right-click the thermometer icon at any time to display the hardware temperatures.
Setting up Psensor to detect your computer's hardware is done the same way as Xsensors, by installing lm-sensors to detect your computer's hardware sensors. Then detect your computer's hardware sensors running the command:
sudo sensors-detect
and as with Xsensors, accept the default answers to all questions.
In Ubuntu 16.04 and later Psensor detects your computer's hardware sensors automatically without running sudo sensors-detect

- 114,770
On Raspberry Pi, you can retrieve the temperatureusing vcgencmd
:
vcgencmd measure_temp
Output:
temp=39.0'C

- 103
- 5

- 293
-
2
-
-
Is there a way to install this on other distros besides Raspbian? For example, Ubuntu Server 19.10 is available for Raspberry Pi, but I'm not aware of how make this command available. – jocull Jan 12 '20 at 23:45
If you like Python, you can use psutil
.
>>> import psutil
>>> psutil.sensors_temperatures()['coretemp']
[shwtemp(label='Physical id 0', current=67.0, high=100.0, critical=100.0), shwtemp(label='Core 0', current=67.0, high=100.0, critical=100.0), shwtemp(label='Core 1', current=65.0, high=100.0, critical=100.0)]
... will do the job. With a little coding, you can for example obtain the Temp vs CPU of your system.
It's convenient to update psutil
by issuing sudo pip3 install psutil --upgrade
.

- 423
- 6
- 18
-
I have it on Python 2 but it doesn't have a
sensors_temperatures
attribute, and I don't have it on Python 3. I'm using Ubuntu 14.04. So how do I get it? – wjandrea Feb 16 '18 at 00:16 -
what version of psutil are you using? mine is 5.4.3. Try upgrading you version:
sudo pip2 install psutil --upgrade
. – Lucas Aimaretto Feb 16 '18 at 00:22 -
1I'm using 1.2.1 on Python 2, and the upgrade fails (but Python 2 on 14.04 is really outdated, so I'm not concerned). I just installed 5.4.3 on Python 3 with
sudo pip3 install psutil --upgrade
. Could you add that to your answer? – wjandrea Feb 16 '18 at 00:27 -
-
Done the update of the answer. Yes, the X axis is CPU usgae: I'm having trouble with a laptop: is heating a lot (+65°C) with very low CPU (aprox 5%) – Lucas Aimaretto Feb 16 '18 at 01:01
-
1great answer (+1) - psutil is a gem. It is ashame it does not cover the HDD temperature – WoJ Jul 26 '19 at 15:04
-
1The only answer that worked. (Ubuntu 20.04) And almost the only one that didn't require installing anything. – Íhor Mé Oct 07 '20 at 18:39
-
All bash:
getTemp () {
for zone in `ls /sys/class/thermal/ | grep thermal_zone`
do
echo -n "`cat /sys/class/thermal/$zone/type`: "
echo `cat /sys/class/thermal/$zone/temp | sed 's/\(.\)..$/.\1°C/'`
done
}
getProcesses() {
top -b -n 1 | head -n 12 | tail -n 6
}
update () {
while :
do
clear
getTemp
echo -e "\nTop 5 CPU hogs:"
getProcesses
sleep 5
done
}
update

- 201
Just so you guys know, none of this install junk like sensors
are needed. Just do an acpi -V
and BOOM, you got everything. Example:
Battery 0: Charging, 91%, 00:17:25 until charged
Battery 0: design capacity 3310 mAh, last full capacity 3309 mAh = 99%
Adapter 0: on-line
Thermal 0: ok, 40.0 degrees C
Thermal 0: trip point 0 switches to mode critical at temperature 127.0 degrees C
Thermal 0: trip point 1 switches to mode hot at temperature 127.0 degrees C
Cooling 0: pkg-temp-0 no state information available
Cooling 1: LCD 0 of 100
Cooling 2: Processor 0 of 10
Cooling 3: Processor 0 of 10
Cooling 4: Processor 0 of 10
Cooling 5: Processor 0 of 10
WAY easier than installing all of this and kmod... Just do acpi -V.

- 388
- 2
- 6
-
30Right… because you don’t have to install that one? Wrong!
The program 'acpi' is currently not installed. You can install it by typing: sudo apt-get install acpi
– e-sushi Oct 01 '14 at 20:32 -
8And, it also doesn't always give the same information. On my machine,
sensors
provides the temperature whereasacpi -V
doesn't show anything about it, unfortunately. – Per Lundberg Oct 16 '15 at 21:36 -
1
acpi -V
is broken for Skylake laptop, Ubuntu 16.04, acpi version 1.7 – WinEunuuchs2Unix May 25 '18 at 22:54
/sys/class/thermal/thermal_zone0/temp
this file holds cpu temperature.
So, you can make a script named temp
and move it to /bin
then in terminal enter temp
.
My temp
file looks like -
#!/bin/bash
cpu_temp=$(< /sys/class/thermal/thermal_zone0/temp)
cpu_temp=$(($cpu_temp/1000))
echo $cpu_temp°C
my answer is modified of www.cyberciti.biz

- 2,621
-
1I've tried 4 machines in different locations and they all give the same reading = 27800. Do you know why this could be? They can't all have the same cpu temp. – Katu Mar 10 '17 at 14:08
-
@Katu I think that might mean 27.8 degrees. I used another program and found my Core 0 was 49 C. Then I did the above command and got 49000. – Philip Kirkbride Apr 20 '17 at 18:06
-
And here's my 2-cents on this matter. There's tmon
, a very simple tool that reads the temperature while running another process, just like time
, watch
, timeout
, etc...
tmon
is a thin wrapper around /sys/class/thermal/thermal_zone*/temp
, and can be useful when monitoring the temperature of your Linux computer/server while running CPU intensive processes: simulation, gaming, etc...
You can download the .AppImage "binary" from here: https://github.com/gmagno/tmon/releases and run it immediately and conveniently, that is:
Install
wget https://github.com/gmagno/tmon/releases/download/v0.3.7/tmon-a461481-x86_64.AppImage
chmod +x tmon*.AppImage
# optional: you may put it somewhere convenient in your file system and add a symlink in /usr/local/bin/tmon
or if you prefer:
pip install tmonpy
Usage
./tmon*.AppImage -h
Examples
./tmon*.AppImage echo "Quick programs return a single value of temperature"
Quick programs return a single value of temperature
===================
Temp Monitor Report:
Temp (°C) for a period of 0:00:00
>> 58.0 °C <<
/tmp/tmon-20200207@16h07m05-znn0x1o9.txt
===================
./tmon*.AppImage bash -c 'echo not so quick ones will show a chart; sleep 6'
not so quick ones will show a chart
===================
Temp Monitor Report:
Temp (°C) for a period of 0:00:06
60.00 ┤
59.86 ┤
59.71 ┤
59.57 ┤
59.43 ┤
59.29 ┤
59.14 ┤
59.00 ┼╮ ╭─
58.86 ┤│ │
58.71 ┤│ │
58.57 ┤│ │
58.43 ┤│ │
58.29 ┤│ │
58.14 ┤│ │
58.00 ┤╰───╯
>> min: 58.0 °C <<
>> avg: 58.4 °C <<
>> max: 59.0 °C <<
/tmp/tmon-20200207@16h08m25-p010ojhq.txt
===================
you may also just run tmon
without any arguments and it will run as you'd expect. Press Ctrl-C to terminate the process and get a temperature report
./tmon*.AppImage # and wait a few seconds before pressing Ctrl-C
^C
===================
Temp Monitor Report:
Temp (°C) for a period of 0:00:08
60.00 ┤
59.71 ┤
59.43 ┤
59.14 ┤
58.86 ┤ ╭╮
58.57 ┤ ││
58.29 ┤ ││
58.00 ┼╮╭╯│
57.71 ┤││ │
57.43 ┤││ │
57.14 ┤││ │
56.86 ┤╰╯ │
56.57 ┤ │
56.29 ┤ │
56.00 ┤ ╰────
>> min: 56.0 °C <<
>> avg: 56.9 °C <<
>> max: 59.0 °C <<
/tmp/tmon-20200207@15h59m37-u4cd94qh.txt
===================

- 205
One can also use bpytop
. Install with:
sudo snap install bpytop
A more powerful version than htop
, with CPU temperature and much more.

- 171
-
Wow, you were NOT kidding! I thought I was going into hyperspace when I first saw that loading screen :) – seeker_of_bacon Feb 02 '22 at 22:54
For Intel CPUs only You can use i7z
.
i7z - A better i7 (and now i3, i5) reporting tool for Linux.
Install it :
sudo apt install i7z
Then run it (it has to be run with sudo
):
sudo i7z
Example output (see Temp
column - scroll right...):
Real Current Frequency 4883.47 MHz [99.98 x 48.85] (Max of below)
Core [core-id] :Actual Freq (Mult.) C0% Halt(C1)% C3 % C6 % Temp VCore
Core 1 [0]: 4883.47 (48.85x) 10.4 73.7 1.45 12.8 47 1.3547
Core 2 [1]: 4871.56 (48.73x) 8.65 76.8 1.5 11.7 45 1.3547
Core 3 [2]: 4877.61 (48.79x) 12.2 75.1 1 9.72 52 1.3547
Core 4 [3]: 4880.70 (48.82x) 7.57 79.7 1 10.5 47 1.3547

- 3,672
If you are using Ubuntu with MATE Desktop Environment, you can use MATE Sensors Applet:
Install the package:
sudo apt-get install mate-sensors-applet
And if you have Nvidia graphics card you can also install
mate-sensors-applet-nvidia
package.Make right click on MATE Panel and click Add to Panel then choose Hardware Sensors Monitor
After adding you can setup it by doing right click on any sensor and selecting Preferences
Here you can customize the list of sensors: CPU, Motherboard and GPU temperature, main voltages (Vcore, 3.3V, 5V, 12V, etc) and fan speeds. The full list depends on hardware (image above is for desktop with Nvidia graphics card).
The result will look like
Of course you can move this applet to the best location.

- 99,918
There are a lot of different places you might find the temperature listed in millidegrees. I finally found mine here:
/sys/devices/platform/coretemp.0/temp*_input
Here are some other places users have reported to have found their temperature
/proc/acpi/thermal_zone/THRM/temperature
/sys/class/thermal/thermal_zone*/temp
/sys/class/thermal/cooling_device*/temp
/sys/devices/platform/f71882fg.1152/temp*_input
/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp*_input
Some of these are just symbolic links to the others. You may have to look carefully to find it

- 476
-
3it was at
/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp*_input
on my Dell Precision M4800 – igagis Jun 26 '20 at 11:27 -
-
@momo2047 If you find it, let me know where, and I will add it to my answer. – Nacht Oct 11 '22 at 05:03
computertemp is a simple applet that shows your current CPU temperature + it has some additional 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 evgeny's answer.
computertemp is not available in the newer Ubuntu repositories.
-
2in Ubuntu 15.04
sudo apt-get install computertemp
results in the error "Unable to locate package computertemp" ... – Nicolas Ivanov Jun 22 '15 at 14:32
printf '%d°\n' $(sensors | grep 'id 0:' | awk '{ print $4 }') 2>/dev/null
55°
printf '%d\n' Will convert the value to integer in case you need it as a round number
Sources: Linuxhacks.org
Disclosure: I am the owner of Linuxhacks.org

- 854
-
2Why
echo $(printf ..)
and not justprintf '%d°\n' $(sensors | grep 'id 0:' | awk '{ print $4 }') 2>/dev/null
? ... Or even justsensors 2>/dev/null | awk '/id 0:/{printf "%d°\n", $4}'
– muru Apr 08 '18 at 01:08 -