Scan for Bad Sectors With badblocks

Read a whole disk and report sectors that cannot be read.

LinuxhardwarediskDiagnosticsMedium risk
Run sudo badblocks -sv /dev/sdb for a verbose read-only scan.

01Command

Command
$ sudo badblocks -sv /dev/sdb

02What it does

Without -w, badblocks only reads, so it never overwrites data while revealing failing sectors on a suspicious drive. A long verbose scan is exactly the kind of unattended job the terminal is built for, and it can log progress for review.

03Risk

RiskMedium risk
Requirementssudo apt install e2fsprogs
!Warning: Even a read-only scan of a failing disk can accelerate its death; back up first and avoid -w unless the disk is empty.

04Undo

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

05Sources

Last verified: 2026-10-13 · Category: System & Settings

06Related solutions