The hard drive lasts longer if it runs within the optimal operating temperature. It is then essential to monitor the hard drive's temperature to ensure its longevity.
Harddrive or harddisk typically has a built-in temperature sensor, and the harddrive's built-in S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) system manages the thermal information. S.M.A.R.T. enables monitoring temperature of both magnetic hard drive and Solid State Drive or SSD.
hddtemp is a command-line utility that is available in Linux to view harddisk temperature.
$ sudo apt update && sudo apt install --assume-yes hddtemp
$ sudo systemctl start hddtemp
$ sudo systemctl enable hddtemp hddtemp.service is not a native service, redirecting to systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable hddtemp
$ lsblk | grep disk sda 8:0 0 465.8G 0 disk
$ sudo hddtemp /dev/sda /dev/sda: TOSHIBA MQ01ACF050: 39°C
Comment anonymously. Login not required.