How to see CPU temperature on CentOS 7 and RedHat Enterprise Linux 7

I am a new sysadmin of CentOS 7 server. How do I get my CPU temperature Information on CentOS Linux 7/8 or Red Hat Enterprise Linux 7/8 server? How can I read my CPU temperature on a Laptop powered by CentOS Linux 7 desktop operating system?

You need to install Linux hardware monitoring tool called lm_sensor. This tool provides some essential command line utilities for monitoring the hardware health of Linux systems containing hardware health monitoring hardware including CPU and fan speed. The following instructions works on CentOS/RHEL version 7 and 8.

Find out your os version

Type the following cat command:
$ cat /etc/centos-release
$ cat /etc/redhat-release
Sample outputs:

CentOS Linux release 7.2.1511 (Core) 

Install lm_sensors package on CentOS or RHEL 7 / 8

Type the following yum command:
$ sudo yum install lm_sensors
Sample outputs:

Fig.01: Installing ln_sensors on CentOS 7/RHEL 7

How to configure lm_sensors

Type the following command and say YES to all prompts:
$ sudo sensors-detect
Sample outputs:

# sensors-detect revision 6170 (2013-05-20 21:25:22 +0200)
# System: ADI Engineering RCC-VE [1.0]

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.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             Success!
    (driver `coretemp')
Intel AMB FB-DIMM thermal sensor...                         No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded 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): YES
Probing for `Maxim MAX6639'...                              No
Probing for `Analog Devices ADM1029'...                     No
Probing for `ITE IT8712F'...                                No
Probing for `Fintek custom power control IC'...             No
Probing for `Winbond W83791SD'...                           No
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

Now follows a summary of the probes I have just done.
Just press ENTER to continue: 

Driver `coretemp':
  * Chip `Intel digital thermal sensor' (confidence: 9)

Do you want to overwrite /etc/sysconfig/lm_sensors? (YES/no): YES
Unloading i2c-dev... OK

How to get CPU temperature information on a CentOS/RHEL 7 Linux

Type the following command:
$ sensors
Sample outputs:

Adapter: ISA adapter
Core 0:       +48.0°C  (high = +98.0°C, crit = +98.0°C)
Core 1:       +48.0°C  (high = +98.0°C, crit = +98.0°C)
Core 2:       +48.0°C  (high = +98.0°C, crit = +98.0°C)
Core 3:       +47.0°C  (high = +98.0°C, crit = +98.0°C)

You can run the following watch command to see data on screen:
$ watch sensors
Sample output:

Gif.01: Sensors command in action

How do I get my hard drive temperature information on a CentOS/RHEL 7 Linux?

You can always install the hddtemp command to read hard disk temperature on a CentOS/RHEL 7:
$ hddtemp
Sample outputs:

/dev/sda: Samsung SSD 850 EVO mSATA 500GB: 45°C
/dev/sdb: WDC WDS500G1B0A-00H9H0: 42°C
/dev/sdc: WDC WDS500G1B0A-00H9H0: 42°C
/dev/sdd: WDC WDS500G1B0A-00H9H0: 40°C
/dev/sde: WDC WDS500G1B0A-00H9H0: 39°C


You learned how to find CPU and hard disk/ssd temperature on both CentOS and RHEL version 7/8 using the command-line options.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Sam Aug 15, 2016 @ 7:15

    lm_sensors package works fine on desktops/laptops but when it comes to servers especially with CentOS 7 it’s a problem, and thus is there no alternative package to do the same task?

  • mschindl Dec 4, 2020 @ 7:57

    Thank you, works still good with RedHat Enterprise Linux 8

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum