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.
Steps to check temperature information in Linux:
- Open a terminal with access to a user account that can run sudo.
- Install lm-sensors on Ubuntu or Debian using APT.
$ sudo apt update && sudo apt install --assume-yes lm-sensors Hit:1 http://ports.ubuntu.com/ubuntu-ports noble InRelease Hit:2 http://ports.ubuntu.com/ubuntu-ports noble-updates InRelease Hit:3 http://ports.ubuntu.com/ubuntu-ports noble-backports InRelease Hit:4 http://ports.ubuntu.com/ubuntu-ports noble-security InRelease Reading package lists... Building dependency tree... Reading state information... 5 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Building dependency tree... Reading state information... lm-sensors is already the newest version (1:3.6.0-9build1). 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
On Fedora use sudo dnf install lm_sensors; on openSUSE use sudo zypper install --no-confirm lm_sensors.
- Detect and configure available hardware sensors using sensors-detect in automatic mode.
$ sudo sensors-detect --auto No i2c device files found.
Messages like this indicate that the environment does not expose sensor buses; run the probe on a physical host to detect and load hardware sensor drivers.
- 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 /usr/lib/systemd/systemd-sysv-install. Executing: /usr/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.
- Display current temperature and sensor data using the sensors command.
$ sensors No sensors found! Make sure you loaded all the kernel drivers you need. Try sensors-detect to find out which these are.
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 - Query ACPI thermal zones for an additional view of temperature readings when the acpi utility is installed.
$ acpi -t No support for device type: thermal
On systems without ACPI-based thermal reporting, this command can return no output or an error even when lm-sensors provides valid readings.
- Install optional graphical monitoring tools for desktop integration if persistent on-screen temperature indicators are needed.
- 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.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
