Verify a file's SHA-256 checksum on Mac
Confirm a downloaded ISO, DMG or installer matches the publisher's official hash.
01Command
$ shasum -a 256 ~/Downloads/installer.dmg02What it does
A SHA-256 digest is a fingerprint of the file's bytes: if even one bit changed in transit or on a compromised mirror, the hash differs. shasum -a 256 prints it; most project pages publish the expected value to compare by eye, or save it to a file and run shasum -a 256 -c checksums.txt. Use MD5 (md5 file) only where the publisher offers nothing better — it is collision-prone.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- macOS shasum command referenceEvidence: shasum -a 256 prints the SHA-256 digest of a file; matching digests confirm the file is byte-identical to the original.
Last verified: 2026-09-16 · Category: Security & Privacy
06Related solutions
Point macOS screen captures at any folder you choose instead of the desktop.
Grab any file from the web straight into the current folder — no browser needed.
List the biggest files in your home folder that are eating disk space.