How do I monitor and display the CPU temperature using Linux?
9 Answers
As others have noted, you need the lm-sensors package. I thought I should mention that in addition to installing the package, you should run the sensors-detect command to identify the kernel modules that need to be loaded.
If you haven't done this, manually run this once and check if it detects any sensors on board your computer.
$ sudo sensors-detect
# sensors-detect revision 5249 (2008-05-11 22:56:25 +0200)
This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.
We can start with probing for (PCI) I2C or SMBus adapters.
Do you want to probe now? (YES/no):
Probing for PCI bus adapters...
Use driver `i2c-i801' for device 0000:00:1f.3: Intel 82801G ICH7
We will now try to load each adapter module in turn.
Module `i2c-i801' already loaded.
If you have undetectable or unsupported I2C/SMBus adapters, you can have
them scanned by manually loading the modules before running this script.
We are now going to do the I2C/SMBus adapter probings. Some chips may
be double detected; we choose the one with the highest confidence
value in that case.
If you found that the adapter hung after probing a certain address,
you can specify that address to remain unprobed.
Next adapter: SMBus I801 adapter at 10c0 (i2c-0)
Do you want to scan it? (YES/no/selectively):
Client found at address 0x50
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Yes
(confidence 8, not a hardware monitoring chip)
Probing for `EDID EEPROM'... No
Client found at address 0x52
Probing for `Analog Devices ADM1033'... No
Probing for `Analog Devices ADM1034'... No
Probing for `SPD EEPROM'... Yes
(confidence 8, not a hardware monitoring chip)
Probing for `EDID EEPROM'... No
Some chips are also accessible through the ISA I/O ports. We have to
write to arbitrary I/O ports to probe them. This is usually safe though.
Yes, you do have ISA I/O ports even if you do not have any ISA slots!
Do you want to scan the ISA I/O ports? (YES/no):
Probing for `National Semiconductor LM78' at 0x290... No
Probing for `National Semiconductor LM78-J' at 0x290... No
Probing for `National Semiconductor LM79' at 0x290... No
Probing for `Winbond W83781D' at 0x290... No
Probing for `Winbond W83782D' at 0x290... No
Probing for `IPMI BMC KCS' at 0xca0... No
Probing for `IPMI BMC SMIC' at 0xca8... No
Some Super I/O chips may also contain sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no):
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor'... No
Trying family `SMSC'... Yes
Found unknown chip with ID 0x2803
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor'... No
Trying family `SMSC'... No
Trying family `VIA/Winbond/Fintek'... No
Trying family `ITE'... No
Some south bridges, CPUs or memory controllers may also contain
embedded sensors. Do you want to scan for them? (YES/no):
Silicon Integrated Systems SIS5595... No
VIA VT82C686 Integrated Sensors... No
VIA VT8231 Integrated Sensors... No
AMD K8 thermal sensors... No
AMD K10 thermal sensors... No
Intel Core family thermal sensor... Success!
(driver `coretemp')
Intel AMB FB-DIMM thermal sensor... No
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `coretemp' (should be inserted):
Detects correctly:
* Chip `Intel Core family thermal sensor' (confidence: 9)
I will now generate the commands needed to load the required modules.
Just press ENTER to continue:
To load everything that is needed, add this to /etc/modules:
#----cut here----
# Chip drivers
coretemp
#----cut here----
Do you want to add these lines automatically? (yes/NO)
If you're lucky, your laptop will support an array of sensors. If not, you may still find a basic set of sensors for the CPU:
$ sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +40.5°C (crit = +105.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +35.0°C (crit = +100.0°C)
coretemp-isa-0001
Adapter: ISA adapter
Core 1: +40.0°C (crit = +100.0°C)
Using 'sensors' (from lm-sensors) and 'watch' (from procps pkg), you can real-time monitor sensors data on the command line via:
watch -n 1 -d sensors
This will display sensors every 1 sec and highlight the difference from the previous second.
Every 1.0s: /usr/bin/sensors
...
temp1: +55C (high = +50C, hyst = +45C) sensor = thermistor ALARM
temp2: +35.0C (high = +80C, hyst = +75C) sensor = thermistor
temp3: +35.0C (high = +80C, hyst = +75C) sensor = thermistor
- 1,350
Lm-sensors is a hardware health monitoring package for Linux. It allows you to access information from temperature, voltage, and fan speed sensors. It works with most newer systems. This package contains programs to help you set up and read data from lm-sensors.
To install use :
# sudo apt-get install lm-sensors sensors-applet
To use :
# sensors-detect
...
# sensors
V1.5: +2.467 V (min = +1.42 V, max = +1.58 V) ALARM
VCore: +1.479 V (min = +1.48 V, max = +1.63 V) ALARM
V3.3: +3.373 V (min = +3.13 V, max = +3.47 V)
V5: +5.000 V (min = +4.74 V, max = +5.26 V)
V12: +11.734 V (min = +11.38 V, max = +12.62 V)
CPU_Fan: 2299 RPM (min = 4000 RPM) ALARM
fan2: 0 RPM (min = 0 RPM)
fan3: 1057 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
CPU: +41.50°C (low = +10°C, high = +50°C)
Board: +35.25°C (low = +10°C, high = +35°C)
Remote: +35.50°C (low = +10°C, high = +35°C) ALARM
CPU_PWM: 144
Fan2_PWM: 112
Fan3_PWM: 112
vid: +1.550 V (VRM Version 9.0)
or add the applet to your taskbar.

You could also try the computertemp applet.
Computer Temperature Monitor is a little applet for the GNOME desktop that shows the temperature of your computer CPU and disks on screen.
It also allows you to log temperatures to a file. You can set alarms to notify you when a tempertature is reached. Several monitors can be added to the panel to monitor different sensors. It is designed to look like CPU Frequency Gnome applet, so they match each other on panel.
To install use :
sudo apt-get install computertemp
and then add to your taskbar

I have a Dell server (Poweredge R420) running Fedora / Red Hat Linux. I installed lm_sensors, but sensors gave me a message saying the kernel drivers were not loaded. I used sensors-detect to find out which sensor I needed, and it turned out I needed IPMI.
Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `ipmisensors':
* ISA bus, address 0xca8
Chip `IPMI BMC KCS' (confidence: 8)
Warning: the required module ipmisensors is not currently installed
on your system. If it is built into the kernel then it's OK.
Otherwise, check http://www.lm-sensors.org/wiki/Devices for
driver availability.
I checked the page, that advised me to use ipmitool. I installed it, but still it wouldn't work:
$ ipmitool sensor
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Get Device ID command failed
Unable to open SDR for reading
After some more research, I came across this page: http://osdir.com/ml/hardware.ipmitool.devel/2008-02/msg00012.html
Their script ipmimod.sh worked out-of-the-box for me:
#!/bin/bash
#IPMI kernel module installer for Redhat-style machines
#dranch-3r7Miqu9kMnR7s880joybQ@xxxxxxxxxxxxxxxx
#07/26/06 - use absolute paths for modprobe
#05/01/06 - orig version
/sbin/modprobe ipmi_devintf
maj=`cat /proc/devices | awk '/ipmidev/{print $1}'`
echo $maj
if [ -c /dev/ipmi0 ]
then
rm -f /dev/ipmi0
/bin/mknod /dev/ipmi0 c $maj 0
else
/bin/mknod /dev/ipmi0 c $maj 0
fi
IPMI_DRIVERS="ipmi_si ipmi_si_drv ipmi_kcs_drv"
for driver in $IPMI_DRIVERS; do
find /lib/modules/`uname -r`/kernel/drivers/char/ipmi | grep $driver > /dev/null
RETURN_VALUE=$?
if [ $RETURN_VALUE -eq 0 ] ; then
#Here are specific memory locations for Supermicro AOC-type IPMI cards
/sbin/modprobe $driver type=kcs ports=0xca8 regspacings=4
break
fi
done
After running that, I am finally able to see the CPU temperature:
$ ipmitool sensor | grep Temp
Inlet Temp | 24.000 | degrees C | ok | na | -7.000 | 3.000 | 42.000 | 47.000 | na
Temp | na | degrees C | na | na | 3.000 | 8.000 | 77.000 | 83.000 | na
Temp | na | degrees C | na | na | 3.000 | 8.000 | 77.000 | 83.000 | na
I hope this helps anyone with dell servers having difficulty to get the temperatures.
- 1,535
Linux allows you to access temperature info sensors. It works with RH6.2x64.
This driver contains read support using lm-sensors:
type
modprobe coretemp
sensors
I discovered other software with gui to monitor temperatures. The name of the software is: Psensor: https://wpitchoune.net/psensor/
And see the article from Internet: https://www.tecmint.com/psensor-monitors-hardware-temperature-in-linux/
To install on Ubuntu/Mint, run this command at your terminal:
sudo apt install psensor
To run the application, just run this:
sudo psensor
Thanks.
- 169
ACPI
Worth a mention a mention the acpi command,
acpi -t # or -V for all
-t | --thermal: show thermal information
From apt-cache show acpi:
Description-en: displays information on ACPI devices Attempts to replicate the functionality of the "old" apm command on ACPI systems, including battery and thermal information.
Does not support ACPI suspending, only displays information about ACPI devices.
On Ubuntu-like system you can install it with
sudo apt-get install acpi
Note: you can monitor the temperature with watch -n 1 -d acpi -V or you can start to parse its output (or the sensors one) with a script (with or without the date command), adding colours, logging the output into a file...
while [[ 1 ]] ; do acpi -t | awk '{printf ("%2.2f ",$4)}'; date; sleep 1 ; done
- 19,483
- 9
- 55
- 99
You could return the command line in a conky file to show it on your screensaver. It is still less bloated than a space-eating applet.
sudo apt-get install conky
Then construct the .conkyrc file of your dreams in your /home/user folder and add it to your applications lauched at start.
IMP: See tutorials about conky or premade .conkyrc, Ubuntu and ubuntu-fr forums threads, Lifehacker and more for nice conky setups.
- 12,326
- 468
You can read out the various temperature sensors without any special tools.
To find and read all available sensors, execute:
grep . /sys/class/hwmon/hwmon*/temp*_(input|label)
This will print the reading (in milli-degrees celsius) and the sensor label for each available sensor.
Note that some sensors are only available if the required kernel modules are installed. You can use the tools described in the other answers to find those.
After you determined which sensor you want to read, you may want to switch to the more stable /sys/devices namespace. For example, if I want to read hwmon1/temp2:
> ls -l /sys/class/hwmon
total 0
drwxr-xr-x 2 root root 0 2024-12-04 08:50 .
drwxr-xr-x 58 root root 0 2024-12-04 05:56 ..
lrwxrwxrwx 1 root root 0 2024-12-04 08:50 hwmon0 -> ../../devices/pci0000:00/0000:00:01.2/0000:20:00.0/0000:21:00.0/0000:22:00.0/nvme/nvme0/hwmon0
lrwxrwxrwx 1 root root 0 2024-12-04 08:50 hwmon1 -> ../../devices/pci0000:00/0000:00:03.1/0000:2d:00.0/0000:2e:00.0/0000:2f:00.0/hwmon/hwmon1
lrwxrwxrwx 1 root root 0 2024-12-04 08:50 hwmon2 -> ../../devices/platform/nct6775.2592/hwmon/hwmon2
lrwxrwxrwx 1 root root 0 2024-12-04 08:50 hwmon3 -> ../../devices/pci0000:00/0000:00:18.3/hwmon/hwmon3
Then I would read /sys/devices/pci0000:00/0000:00:03.1/0000:2d:00.0/0000:2e:00.0/0000:2f:00.0/hwmon/hwmon*/temp2, to ensure that I always get the right reading, even if the sensor numbering changes.
- 155