How to Verify Your Download Using an MD5 Checksum
Real life data tends to get corrupted because machines (and humans) are never as reliable as hoped. One efficient way is make sure your data 100% correct is to generate some kind of hash. That hash shall be unique, compact and efficient.
What You Need
- The file(s) you downloaded (e.g.,
your_data.file
) - The MD5 checksum file (e.g.,
md5sum.txt
) which contains one line per file, in this format:25e800aae700a9a1f20f3ae28f5ccc96 your_data.file
- Note: There are TWO spaces between the checksum(s) and the filename(s)
Linux Instructions
- Open Terminal
- Press Ctrl + Alt + T, or find Terminal in your applications menu
- Navigate to your data folder
- Type
cd
followed by the path to your folder - For example:
cd /path/to/data-files
- Type
- Verify the checksum
- Type:
md5sum -c md5sum.txt
- Press Enter
- You should see:
your_data.file: OK
- If it doesn't match, you'll see:
your_data.file: FAILED
- Type:
macOS Instructions
- Open Terminal
- Press Command + Space
- Type "Terminal"
- Press Enter
- Navigate to your data folder
- Type
cd
followed by the path to your folder - For example:
cd /path/to/data-files
- Type
- Verify the checksum
- Type:
md5 -c md5sum.txt
- Press Enter
- You should see:
your_data.file: OK
- If it doesn't match, you'll see:
your_data.file: FAILED
- Type:
Windows Instructions
- Open Command Prompt
- Press the Windows key + R
- Type
cmd
and press Enter
- Navigate to your data folder
- Type
cd
followed by the path to your folder - For example:
cd C:\path\to\data-files
- Type
- Verify the checksum
- Type:
certutil -hashfile lims-samples-labels.docx MD5
- Press Enter
- Compare the displayed checksum with the one in your md5sum.txt file
- They must match exactly, character by character
- Type:
Note: Windows doesn't have a built-in command to directly verify against a checksum file. You'll need to compare the numbers manually.
Common Issues
- "Command not found"
- Windows: Make sure you're using Command Prompt, not PowerShell
- macOS/Linux: Your terminal might be in the wrong directory
- "File not found"
- Make sure both the data file and checksum file are in the same folder
- Check that the filenames match exactly, including case
- File names are case-sensitive on macOS and Linux
- "FAILED" or checksums don't match
- Your download might be incomplete or corrupted
- Try downloading the file again
- Check that the checksum file hasn't been modified
Need Help?
- Make sure both files are in the same folder
- Check that the filenames in the checksum file match your actual files exactly
- On Linux/macOS, make sure there are exactly two spaces between the checksum and filename
- If verification fails, try downloading both files again