Linux Command: sha256sum
Compute and verify SHA-256 message digests
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.
Related Resources