Many download pages publish a checksum for each file: a long value such as 3770c7a54890…, often in a list called SHA256SUMS. If your copy of the file gives the same value, it is complete and has not changed. Your torrent client already checks every piece it downloads. Checksums help with files from a web link, files you copied or moved, and files you download from your service to your computer. The steps were tested over SSH on our demo service, with the Debian 13.8 installation image (795 MB).

Connect over SSH first: SSH how to get connected.


1. Check a File Against the List of Its Site

Go to the folder of the file, download the list from the same page as the file, and let sha256sum check it:

cd ~/downloads
wget https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS

The answer looks like this:

debian-13.8.0-amd64-netinst.iso: OK

The list of Debian also names two other images that are not in the folder; --ignore-missing skips such files. Checking the 795 MB takes about 4 seconds.

2. When the Check Fails

A damaged or incomplete file gets FAILED. A copy cut off after 100 MB, for example, gives:

debian-13.8.0-amd64-netinst.iso: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match

Download such a file again. A download that has not finished yet is incomplete too, so it fails the same way.

3. Only One Value on the Page

Some pages show the value without a list. Put the value and the name of the file into one line, with two spaces between them, and pass the line to sha256sum -c:

echo "VALUE  debian-13.8.0-amd64-netinst.iso" | sha256sum -c

Replace VALUE with the value from the page. The answer is OK, as in step 1. To see the value of a file, run sha256sum with only the name of the file; it prints the value, two spaces and the name.

For other kinds of values, the commands are sha512sum (SHA-512, for example for the list SHA512SUMS of Debian), sha1sum (SHA-1) and md5sum (MD5).

4. Check Files After Downloading Them to Your Computer

To be sure that a folder arrived complete on your computer, make a list on your service first, in that folder:

cd ~/downloads/myfolder
find . -type f ! -name SHA256SUMS -exec sha256sum {} + > SHA256SUMS

This lists every file of the folder and of its subfolders. Download the folder together with SHA256SUMS, for example with FileZilla (Download files from server via FTP – FileZilla). On a Linux computer, open the folder in a terminal and run:

sha256sum -c SHA256SUMS

Every file should show OK. A file that was changed or damaged shows FAILED.

On Windows, PowerShell shows the value of a file with Get-FileHash followed by the name of the file, and on a Mac the Terminal does it with shasum -a 256 followed by the name. Compare the value with the line of the file in SHA256SUMS.


Good to Know

  • The shorter sha256sum * > SHA256SUMS lists only the files directly in the folder and prints Is a directory for each subfolder. Run a second time, it also lists the old SHA256SUMS itself, which then fails the check. The find command of step 4 avoids both.
  • A checksum shows that a file is complete and unchanged. It does not show who made the file; some projects also sign their lists, which this guide does not cover.
Was this answer helpful? 0 Users Found This Useful (0 Votes)