Using hddtemp to determine the temperature of your hard drive(s)

From the man-page:

hddtemp will give you the temperature of your hard drive by reading Self-Monitoring Analysis and Reporting Technology (S.M.A.R.T.) information on drives that support this feature. Only modern hard drives have a temperature sensor. hddtemp supports reading S.M.A.R.T. information from SCSI drives too. hddtemp can work as simple command line tool or as a daemon. You can specify one or more device drive path, where each path can be prefixed with a type like PATA, SATA or SCSI to force hddtemp too use one of these type (because detection can fail).

Before using hddtemp, you'll want to know how your hard drive(s) are referenced on your machine; a quick way to do this is by using the df command:

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              71G   41G   27G  61% /
none                  1.6G  388K  1.6G   1% /dev
none                  1.6G  212K  1.6G   1% /dev/shm
none                  1.6G  204K  1.6G   1% /var/run
none                  1.6G     0  1.6G   0% /var/lock
none                  1.6G     0  1.6G   0% /lib/init/rw
/dev/sdb1             459G  292G  145G  67% /media/secondary

This command also displays stastics related to hard drive size, space utilized, and space remaining on drive(s). From the output above, we can see that the two hard drives that are currently mounted in this example are listed as: "/dev/sda1" and "/dev/sdb1"

If not already installed, use your distributions package manager to download/install hddtemp.

$ sudo apt-get install hddtemp // debian or ubuntu
$ sudo yum install hddtemp // red hat or fedora

Remember that you can list multiple hdd's and that you will want to specify the drive type. In the example below, we are asking to list the current temperature of two SATA drives.

$ sudo hddtemp SATA:/dev/sda1 SATA:/dev/sdb1
/dev/sda1: WDC WD800JD-75JNC0: 45°C
/dev/sdb1: ST3500410AS: 42°C

Fahrenheit / Celsius Conversions

If you choose to think in terms of Fahrenheit instead of Celsius, you might like to convert hddtemp's output to something that you are more familiar with. Enter a number in either field, then click outside the text box.

F: 
C: 

Keep in mind that each manufacturer will specify a range of recommended operating temperatures for their hard drives and that there is no magic temperature that is recommended for all hdd's, although some say that your drive should not exceed 55° or 60° C. Check with your hdd's manufacturer for remcommended operating temperatures.

Other Resources: