Verify a file's checksum with `sha256sum`

Every ISO download page publishes a SHA-256 sum — this is the two-step command that actually checks it, plus the batch mode people forget.

Linuxsha256sumintegritychecksumLow risk
Run `sha256sum file.iso` and compare the hash with the published value, or use `sha256sum -c SHA256SUMS` to verify every file listed in a checksum file at once.

01Command

Command
$ sha256sum ubuntu-24.04-desktop-amd64.iso

02What it does

The bare command prints the 64-character digest of a file; a single differing character means the download is corrupted or tampered with. The forgotten part is check mode: `sha256sum -c checksums.txt` validates all files listed in the file and prints OK/FAILED per line. Use `sha256sum *.iso > SHA256SUMS` to generate such a file yourself before copying files to backup media.

03Risk

RiskLow risk
RequirementsPart of GNU coreutils, preinstalled on all Linux distros
!Warning: Checksums only prove integrity if you got the hash from a trusted source — a hash published on the same untrusted mirror proves nothing.

04Undo

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

05Sources

Last verified: 2026-09-17 · Category: Security & Privacy