How to verify a Linux download
Two minutes that confirm the file arrived complete and is the one the project published.
1. Get the official checksum
On the distro's own website, open its checksum or verify page and find the SHA256 value for the exact file you downloaded. Each distro page here links to it under "Download". Never take a checksum from a mirror or a forum post.
2. Compute the checksum of your file
Open a terminal in the folder with the download and run the command for your system. Replace linux.iso with the file's real name.
Windows
PowerShell (Start menu, type PowerShell)
Get-FileHash .\linux.iso -Algorithm SHA256macOS
Terminal (Applications, Utilities)
shasum -a 256 linux.isoLinux
Terminal
sha256sum linux.iso
If the project only publishes SHA512 or MD5, swap the algorithm: -Algorithm SHA512 or
-Algorithm MD5 on Windows, shasum -a 512 or md5 on macOS,
sha512sum or md5sum on Linux. MD5 catches broken downloads but not deliberate tampering,
so check the signature too when the project offers one.
3. Compare the two values
They must match exactly, every character. Capital and small letters don't matter. If they differ, delete the file and download it again from the official site. Don't write a file that fails this check to a USB stick.
Optional: check the signature
A matching checksum proves the file matches the list you compared against. A GPG signature also proves the list
came from the project. Most distros sign their checksum list; their verify page names the key and the file names.
On Windows, install Gpg4win first; macOS needs GPG Suite or Homebrew's gnupg.
Import the project's signing key (the key ID or file is on its verify page)
gpg --recv-keys KEY_IDCheck the signature on the checksum list
gpg --verify SHA256SUMS.gpg SHA256SUMSLook for "Good signature" from the key the project names. A warning that the key isn't certified is normal unless you've signed the key yourself.
Questions
Why verify a Linux download?
It confirms the file arrived complete and is the one the project published. A broken download can fail to boot or install; a swapped file could contain malware.
Is a matching SHA256 checksum enough?
It proves the file matches the checksum you compared against. If you copied that checksum from the project's own site over HTTPS, that is enough for most people. The GPG signature check also proves the checksum list came from the project.