hdparm
SATA/IDE drive parameter control
TLDR
Get device identification
SYNOPSIS
hdparm [OPTIONS] device
DESCRIPTION
hdparm gets and sets parameters for SATA and IDE hard disk drives. It can display detailed device identification, configure power management settings including APM levels and standby timeouts, test read performance, and enable or disable various drive features.
The tool is essential for tuning disk power management on Linux systems. It can configure Advanced Power Management (APM) levels where values 1-127 allow spin-down and 128-254 keep the drive spinning, set standby idle timeouts, force drives into standby or sleep mode, and perform cached and buffered read speed benchmarks.
PARAMETERS
-I
Display detailed device identification-i
Display kernel's cached identification info-B [value]
Get or set Advanced Power Management (1-254)-C
Display current power mode status-S value
Set standby timeout (0=off, 1-240=5s increments, 241-251=30m increments)-y
Force drive into standby mode-Y
Force drive into sleep mode (may require hard reset)-t
Test buffered read speed-T
Test cache read speed--security-erase password
Secure erase the drive
CONFIGURATION
/etc/hdparm.conf
Persistent configuration file for drive parameters on Debian-based systems. Settings defined here are applied at boot time, ensuring APM levels, DMA modes, and other parameters survive reboots.
CAVEATS
Some features require kernel and hardware support. APM values 1-127 allow spindown while 128-254 keep the drive spinning. Sleep mode may require power cycling to recover.
HISTORY
hdparm has been the standard Linux tool for drive parameter control since the early days of IDE drives.
