How to Check a Download’s SHA-256 Checksum on Linux Mint

A download can finish without being the file you expected. A SHA-256 checksum gives you a practical way to compare it with the publisher’s copy. It is not a malware detector, but it can catch a damaged or substituted download.

What you need

Use a Linux Mint desktop, the downloaded file and a SHA-256 checksum from the publisher’s official source. Make sure the checksum is for the exact file and version you downloaded. A checksum for a different release is about as helpful as a key for someone else’s shed.

You also need the sha256sum utility. Open a terminal and check:

command -v sha256sum

If this prints a path, the utility is available. If it prints nothing, check for the coreutils package in Mint’s software manager using your configured trusted repositories.

Check the file

  1. Find the published checksum. Look for a SHA-256 value alongside the download on the publisher’s official site. Keep it handy for comparison. It should be 64 hexadecimal characters.
  2. Calculate your file’s checksum. In the command below, replace PATH_TO_DOWNLOADED_FILE with the actual path to your file. This is a placeholder, not a literal filename. Keep the double quotes, particularly if the path contains spaces.
    sha256sum -- "PATH_TO_DOWNLOADED_FILE"
  3. Compare the values. The command prints a checksum followed by the filename. Compare the checksum with the publisher’s value, not the filename. Letter case does not matter, but every hexadecimal character must otherwise match.

Test and troubleshoot

If the values match, the downloaded bytes match the published SHA-256 value. If they differ, do not install or open the file yet. Check that you used the right file, version and checksum type, then download it again from the official source and repeat the comparison.

If the terminal reports that the file cannot be found, check the path and spelling. If it reports permission denied, check that your user can read the file. A command error is not a checksum mismatch.

What remains unverified

This check does not prove the file is safe or that the publisher’s site is uncompromised. An attacker who can replace both the file and its published checksum can make them match. Where the publisher provides a verified signature, check that too using its instructions. This article does not verify any particular download or publisher’s checksum.