How to View and Monitor Linux Temperature

Monitoring your system’s temperature is critical, especially when dealing with servers, laptops under heavy load, or custom-built PCs. High temperatures can lead to reduced performance, hardware damage, or sudden shutdowns. Fortunately, Linux offers powerful tools to monitor CPU, GPU, and hard drive temperatures in real-time.

Here’s how you can view and monitor system temperatures on a Linux machine.

1. Install lm-sensors

lm-sensors is the most widely used tool for reading hardware temperature, voltage, and fan speed.

To install:

  • Debian/Ubuntu:

sudo apt install lm-sensors
  • RedHat/CentOS/Fedora:

sudo dnf install lm_sensors

After installation:

Run the sensor detection script:

sudo sensors-detect

Answer “yes” to the prompts. Then, run:

sensors

Example Output:

coretemp-isa-0000
Adapter: ISA adapter
Core 0: +45.0°C
Core 1: +46.0°C

2. Monitor Temperature in Real Time

You can use “watch” to view temperatures at regular intervals:

watch -n 2 sensors

This refreshes the output every 2 seconds.

 3. Check GPU Temperature (NVIDIA/AMD)

NVIDIA:

Install NVIDIA tools:

sudo apt install nvidia-smi

Then run:

nvidia-smi --query-gpu=temperature.gpu --format=csv

AMD (via radeontop or sensors):

Install:

sudo apt install radeontop

Or rely on:

sensors | grep temp

 4. Check Hard Disk Temperature

You can use hddtemp or smartctl from the smartmontools package.

To install:

sudo apt install smartmontools

Check drive temperature:

sudo smartctl -A /dev/sda | grep Temperature

5. Graphical Temperature Monitoring Tools

If you prefer GUI-based tools:

  • Psensor: Displays CPU, GPU, HDD temperatures in real time.

sudo apt install psensor
  • GNOME Sensors Applet: Ideal for GNOME desktop environments.

 6. Automated Monitoring & Alerts

You can use cron jobs or monitoring tools like Nagios, Zabbix, or Netdata to:

  • Set threshold alerts

  • Log temperature over time

  • Trigger scripts or shutdown on overheating

 Conclusion

Monitoring temperature on Linux is both simple and flexible — whether you prefer command-line tools or full graphical dashboards. Regular checks can prevent overheating, hardware failures, and costly downtime.