Tools and labs

How to Verify Downloads with SHA-256 Checksums (Windows, Mac and Linux)

When you download an ISO, a tool or an installer, how do you know it was not corrupted or tampered with? A checksum gives you a quick, free way to check. It takes one command.

Is guide ka poora Hinglish version abhi taiyaar ho raha hai. Tab tak ise English mein padho.

SHA-256checksumsintegritydownloads

Why verify downloads at all?

Downloads can go wrong in two ways:

  • Corruption: a network glitch breaks the file. An ISO might fail to boot strangely.
  • Tampering: a malicious mirror or fake download site serves a modified file with malware inside.

Checking a checksum against the official value catches both. For security tools and operating system images you plan to use in your home lab, this is a good professional habit.

How checksums work

A hash function like SHA-256 turns any file into a fixed 64 character hexadecimal string. Change a single byte in the file, and the string changes completely. So if your computed hash matches the official one exactly, the file is the same as the one the publisher hashed. Our password hashing post explains hash properties in more detail.

On Linux

sha256sum ubuntu.iso

If the publisher provides a checksum file, such as SHA256SUMS, put it in the same folder and run:

sha256sum -c SHA256SUMS --ignore-missing

You should see OK next to your file name.

On macOS

shasum -a 256 ubuntu.iso

Compare the output with the official value.

On Windows

In PowerShell:

Get-FileHash .\ubuntu.iso
Get-FileHash .\ubuntu.iso -Algorithm SHA256

SHA-256 is the default algorithm for Get-FileHash. In Command Prompt you can also use:

certutil -hashfile ubuntu.iso SHA256

To compare automatically in PowerShell:

(Get-FileHash .\ubuntu.iso).Hash -eq "PASTE_OFFICIAL_HASH_HERE".ToUpper()

It prints True or False.

Where to get the official hash

  • From the official website, on the download page or a linked checksum file, ideally over HTTPS.
  • Not from a random forum, a YouTube description or the same unofficial mirror you downloaded from. If an attacker controls the mirror, they can change both the file and the checksum shown there.

Going further: signatures

A checksum proves the file matches a hash. But who published that hash? Digital signatures answer that. Many projects sign their checksum files with a GPG key or sign installers with code signing certificates. Kali Linux, for example, documents how to verify its images, including signed checksum files.

On Windows, you can also right click an installer, open Properties, then Digital Signatures to see who signed it. An unsigned installer from an unknown source deserves extra caution.

Make it a habit

For OS images, security tools and anything you run with admin rights, verify the hash. It takes 30 seconds. Try it now with any file you downloaded recently, and also try the hash tool on our home page with a short text to see how small changes produce different hashes.

Frequently asked questions

Is MD5 or SHA-1 okay for checksums? They can still detect accidental corruption, but they have known weaknesses that make deliberate tampering possible in some cases. Prefer SHA-256 or stronger when the publisher offers it.

The hash does not match. What now? Delete the file and download again from the official source. If it still does not match, do not run it, and check the project's official announcements.

Uppercase and lowercase letters differ. Is that a mismatch? No. Hexadecimal hashes are not case sensitive. Compare the characters, not the case.

Do app stores verify downloads for me? Official app stores handle signature checks for apps installed through them. Checksums matter most for files you download directly, such as ISOs, installers and tools.

Does a matching checksum mean the software is safe? It means the file is the one the publisher released. If the publisher itself was compromised, the checksum would match a bad file too. That is why signatures, reputable sources and keeping software updated all matter together.

Try it now in two minutes

Download any small official file, for example a release from an open source project you trust that publishes SHA-256 values. Compute its hash with the command for your system and compare. Then change one character in a copy of a text file and hash both versions to see the difference. Note the steps in your lab notebook, it is a nice small entry for your portfolio.

Educational content, not legal advice. Check official sources before you rely on it. If you have lost money, call 1930 now. Terms