Check Disk Health with smartctl -H

smartctl -H queries a drive's SMART self-assessment and answers with PASSED or FAILED in one line.

LinuxhardwaresmartdiskMedium risk
Run `sudo smartctl -H /dev/sda` to get the drive's SMART health verdict, and `sudo smartctl -a /dev/sda` for full attribute details like reallocated sectors.

01Command

Command
$ sudo smartctl -H /dev/sda

02What it does

The -H shortcut is the forgotten one-liner: it asks the drive for its own health assessment and prints "PASSED" or "FAILED" plus a note to run -a for details when it fails. For deeper diagnosis, `smartctl -a` (or `-x`) shows attributes such as Reallocated_Sector_Ct and Current_Pending_Sector, which are the early-warning counters. NVMe drives report similar output with `smartctl -a /dev/nvme0` via the NVMe SMART/health log.

03Risk

RiskMedium risk
Requirementssmartmontools package (apt install smartmontools / dnf install smartmontools).
!Warning: A PASSED result does not guarantee a healthy disk — always review the raw attribute values; run as root or add yourself to appropriate permissions.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions