🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

💡 Firewall & Security March 13, 2026 5

Linux Command: sha256sum

Compute and verify SHA-256 message digests

Terminal — Firewall & Security
Command
$ sha256sum ubuntu.iso
Output
Computes the SHA-256 hash of a file.

sha256sum calculates and verifies SHA-256 cryptographic hashes (256-bit). SHA-256 is part of the SHA-2 family and is currently the recommended standard for file integrity verification and security. sha256sum produces a unique 64-character hexadecimal fingerprint. It is computationally infeasible to find two different files with the same hash, making it suitable for security-critical verification. sha256sum is the standard for verifying software downloads, checking backup integrity, and detecting file tampering.

Syntax

sha256sum [OPTION]... [FILE]...

Common Examples

  • sha256sum ubuntu.iso — Computes the SHA-256 hash of a file.
  • sha256sum -c SHA256SUMS — Checks files against their expected SHA-256 hashes.
  • echo -n "password123" | sha256sum — Calculates SHA-256 of a string.
  • sha256sum *.tar.gz > SHA256SUMS — Generates a checksum file for all archives.

Pro Tips

    Master this and 230+ other Linux commands with our comprehensive eBooks and cheat sheets.

    Share this tip