Monitoring hard drive temperature reduces the risk of overheating, unexpected shutdowns, and permanent data loss. Spinning disks and SSDs both degrade faster when exposed to sustained high temperatures, especially under constant workload or in poorly ventilated cases.
Most modern drives expose temperature data through S.M.A.R.T. sensors. Tools such as hddtemp read these values directly from the disk firmware and present them as simple degree readings, allowing quick checks during troubleshooting or performance testing.
On Linux, temperature checks usually require elevated privileges and a correct device path like /dev/sda. Some virtual disks or passthrough devices may not expose temperature information, and certain NVMe or USB enclosures require different utilities, so behavior can differ slightly between systems.
Steps to check hard drive temperature:
- Open a terminal on the Linux system.
$ whoami user
- List available disk devices to identify the correct drive.
$ lsblk | grep disk sda 8:0 0 465.8G 0 disk sdb 8:16 0 1.8T 0 disk
Device names like /dev/sda or /dev/sdb correspond to the disks listed by lsblk.
- Read the temperature of a specific drive with hddtemp.
$ sudo hddtemp /dev/sda /dev/sda: TOSHIBA MQ01ACF050: 39°C
If the command is not found, install hddtemp from the distribution package repository.
- Repeat the check for additional drives when present.
$ sudo hddtemp /dev/sdb /dev/sdb: WDC WD20EFRX-68EUZN0: 33°C
- Monitor temperature continuously during heavy disk activity using watch.
$ watch -n 5 sudo hddtemp /dev/sda Every 5.0s: sudo hddtemp /dev/sda /dev/sda: TOSHIBA MQ01ACF050: 44°C
Use a shorter interval for stress tests and a longer interval for routine monitoring.
- Compare the reported temperatures to a safe operating range and investigate cooling issues if limits are exceeded.
A typical safe range for most drives is roughly 30°C to 50°C, while sustained readings above 60°C can significantly shorten drive lifespan.
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.
Comment anonymously. Login not required.
