Skip to content
TutorialSecurity

How to verify a download's SHA-256 checksum on Windows, macOS and Linux

A practical, step-by-step way to confirm the file you downloaded is exactly what the developer published — using tools already built into your system.

The ALHAJI teamPublished3 min read
كيف تتحقق من بصمة SHA-256 للملفات المحمّلة على ويندوز وماك ولينكس
On this page

When you download an installer or a disk image (ISO), many developers publish a long string of letters and digits next to the download link: the checksum. Comparing it with the file on your computer answers one important question: did the file arrive exactly as published, with no corruption in transit and no tampering?

What is a SHA-256 checksum?

SHA-256 is a hash function: it turns any file, whatever its size, into a fixed 64-character hexadecimal value. Changing even a single byte of the file produces a completely different value, which is why it is used to check file integrity.

Important: a checksum proves your file matches the published value — but that value is only trustworthy if you took it from the developer's official website over HTTPS. If the site itself is fake, its checksum can be fake too.

Before you start

  1. Download the file from the official website, or from the app page on ALHAJI (our links point to official sources).
  2. Copy the SHA-256 value from the official download page, or download the accompanying checksum file — usually named SHA256SUMS or ending in .sha256.
  3. Note where the file is saved, for example your Downloads folder.

Windows: PowerShell

Open PowerShell from the Start menu, go to your Downloads folder and compute the hash (replace the file name with yours):

cd $HOME\Downloads
Get-FileHash .\file-name.iso -Algorithm SHA256

The value appears in the Hash column. To compare it directly with the published value:

(Get-FileHash .\file-name.iso -Algorithm SHA256).Hash -eq "PASTE-THE-PUBLISHED-HASH-HERE"

True means it matches. This comparison is case-insensitive, so upper- or lower-case doesn't matter.

Alternative: Command Prompt

certutil -hashfile file-name.iso SHA256

Alternative: right-click

If 7-Zip is installed, right-click the file and choose CRC SHA → SHA-256.

macOS: Terminal

Open Terminal (Applications → Utilities), then:

cd ~/Downloads
shasum -a 256 file-name.dmg

The command prints the hash followed by the file name; compare it with the published value.

Linux

cd ~/Downloads
sha256sum file-name.iso

If the developer provides a checksum file such as SHA256SUMS in the same folder, you can check automatically:

sha256sum -c SHA256SUMS --ignore-missing

OK next to the file name means it matches.

Reading the result

Result Meaning What to do
Exact match The file is intact and identical to what was published Go ahead and install
Mismatch The file is corrupted or modified — or you're comparing against another version Don't run it; check the version number and download again from the official source

Compare the whole value, not just the first few characters.

Extra step: the digital signature

Some developers digitally sign their files. That proves who published the file, not just that it's intact:

  • Windows: right-click an .exe or .msi → Properties → Digital Signatures tab (only shown for signed files), and check that the signer is the real developer.
  • macOS: Gatekeeper checks that apps are signed and notarized when you open them, and warns you if they aren't. Don't bypass that warning for a file whose source you don't trust.
  • Linux: many distributions publish a GPG signature for the checksum file itself; follow the verification guide on the distribution's official site.

FAQ

Is MD5 or SHA-1 good enough? Both are old and no longer safe against deliberate tampering. Use SHA-256 whenever it's offered.

The developer doesn't publish a checksum — now what? Download directly from the official site, check the digital signature if there is one, and avoid re-upload sites that don't say where a file came from.

Spotted a mistake or something outdated?Tell us

Download links from official sources only.

All articles