Monitoring temperature and hardware sensors on Linux reduces the risk of overheating, throttling, and unexpected shutdowns on desktops, laptops, and servers. Consistent visibility into CPU, chipset, and fan readings highlights blocked airflow, failing coolers, or workloads that push hardware beyond thermal design limits.

Thermal and sensor data is exposed through interfaces such as /sys/class/hwmon and ACPI tables by the Linux kernel. Tools such as lm-sensors discover these endpoints, load appropriate kernel modules, and present raw hardware values as readable temperatures, voltages, and fan speeds in the terminal. Combined with systemd integration, sensor information becomes available on demand or in background services instead of only through ad‑hoc commands.

Different systems expose sensors in different ways, and some readings can be approximate, duplicated, or absent depending on firmware and mainboard design. Running sensors-detect can request additional hardware probes and propose changes to loaded modules, so any change to kernel modules or fan control settings should be applied cautiously, especially on production servers. The steps below focus on lm-sensors on Ubuntu and similar distributions, with optional ACPI queries and desktop tools as complementary monitoring options.

Step-by-step video guide:

Steps to check temperature information in Linux:

  1. Open a terminal with access to a user account that can run sudo.
  2. Install lm-sensors on Ubuntu or Debian using APT.
    $ sudo apt update && sudo apt install --assume-yes lm-sensors
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following NEW packages will be installed:
      lm-sensors
    ##### snipped #####

    On Fedora use sudo dnf install lm_sensors; on openSUSE use sudo zypper install --no-confirm lm_sensors.

  3. Detect and configure available hardware sensors using sensors-detect in automatic mode.
    $ sudo sensors-detect --auto
    # sensors-detect revision $Revision$
    # System: Dell Inc. Latitude E5470 (laptop)
    # Board: Dell Inc. 0VHKV0
    # Kernel: 5.0.0-20-generic x86_64
    # Processor: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (6/78/3)
     
    Running in automatic mode, default answers to all questions
    are assumed.
     
    Some south bridges, CPUs or memory controllers contain embedded sensors.
    Do you want to scan for them? This is totally safe. (YES/no):
    Module cpuid loaded successfully.
    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 16h thermal sensors...                           No
    AMD Family 17h thermal sensors...                           No
    AMD Family 15h power sensors...                             No
    AMD Family 16h power sensors...                             No
    Intel digital thermal sensor...                             Success!
        (driver `coretemp')
    ##### snipped #####

    No error output here indicates that sensor drivers were detected successfully and suggested modules can be added to /etc/modules for loading at boot if required.

  4. Enable and start the lm-sensors service so sensor modules load automatically on boot.
    $ sudo systemctl enable --now lm-sensors
    Synchronizing state of lm-sensors.service with SysV service script with /lib/systemd/systemd-sysv-install.
    Executing: /lib/systemd/systemd-sysv-install enable lm-sensors

    If no /lm-sensors.service unit exists, sensor modules may already be built into the kernel and this step can be skipped.

  5. Display current temperature and sensor data using the sensors command.
    $ sensors
    iwlwifi-virtual-0
    Adapter: Virtual device
    temp1:        +32.0°C
     
    pch_skylake-virtual-0
    Adapter: Virtual device
    temp1:        +33.0°C
     
    acpitz-acpi-0
    Adapter: ACPI interface
    temp1:        +25.0°C  (crit = +107.0°C)
     
    coretemp-isa-0000
    Adapter: ISA adapter
    Package id 0:  +34.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 0:        +34.0°C  (high = +100.0°C, crit = +100.0°C)
    Core 1:        +34.0°C  (high = +100.0°C, crit = +100.0°C)
     
    dell_smm-virtual-0
    Adapter: Virtual device
    Processor Fan:    0 RPM
    CPU:            +34.0°C
    Ambient:        +31.0°C
    SODIMM:         +33.0°C
    Other:          +32.0°C

    Hard drive temperature is not available via lm-sensors; utilities such as hddtemp or smartctl can read disk temperature directly from drive firmware.
    Related: How to check hard drive temperature in Linux

  6. Query ACPI thermal zones for an additional view of temperature readings when the acpi utility is installed.
    $ acpi -t
    Thermal 0: ok, 43.0 degrees C

    On systems without ACPI-based thermal reporting, this command can return no output or an error even when lm-sensors provides valid readings.

  7. Install optional graphical monitoring tools for desktop integration if persistent on-screen temperature indicators are needed.
  8. Verify continuous monitoring by running watch on the sensors command and observing readings over several refresh intervals.
    $ watch -n 2 sensors

    Press Ctrl+C to exit watch after confirming that values update as expected and no sensor reports invalid or critical states.

Discuss the article:

Comment anonymously. Login not required.