How to Verify File Integrity with Checksum When you download or copy files, you need to check whether they have not been tampered with by someone. This is especially important if the files you copy or download are critical files like ISO for servers or backup files. You have to make sure the file is save, and one method to ensure this is done by using the file checksum.

Why Should You Verify?

There are some reasons why you should always verify files you download before using it in the production environment:

  • To verify the file is not modified or tampered with by someone (ex modify file or code to insert virus/malware)
  • To improve security, since modified files could be injected by viruses or malware
  • To prevent unwanted problems during installation due to corrupted files

 

How to Verify File Integrity with Checksum

Verify Checksum of a File in Windows

Windows has plenty of ways of checking file checksum. You can use certutil, Get-FileHash or other application (CLI or GUI) to verify checksum of a file.

Certutil

To check file checksum using certutil first you need to open command prompt then type command:

certutil -hashfile “Windows 10.iso” MD5

Change Windows 10.iso with file you want to check.

How to Verify File Integrity with Checksum Windows CertUtil - www.dedyprastyo.com
Verify File Integrity with Windows CertUtil (Click to zoom)

Get-FileHash

Get-FileHash can be used to check file checksum. It is better (in my opinion) than certutil. To use Get-FileHash you need to open powershell (just type powershell in Windows search box then choose Windows PowerShell) and type the command:

SHA-256

Get-FileHash “Windows 10.iso

MD5

Get-FileHash “Windows 10.iso” -Algorithm MD5

SHA-1

Get-FileHash “Windows 10.iso” -Algorithm SHA1

Again you need to change Windows 10.iso with file name you’d like to check.

How to Verify File Integrity with Checksum Windows Get-FileHash - www.dedyprastyo.com
How to Verify File Integrity with Windows Get-FileHash (Click to zoom)

GUI Application

You can also check file checksums using a GUI application. It’s easier and hassle-free than checking them using a command prompt or PowerShell. Just download, install (sometimes it’s a portable app), and follow the instructions to verify the checksum of files.

 

Verify Checksum of a File in Linux

In Linux, you can use both GUI and CLI apps to verify the checksum of the file. You can use a GUI app like gtkhash or CLI to verify file checksum.

To check file checksum you can open the terminal and type the following command:

SHA-256

sha256sum “Windows 10.iso

MD5

md5sum “Windows 10.iso

SHA-1

sha1sum “Windows 10.iso

 

Verify Checksum of a File in Mac

To check file checksum in Mac you can open terminal and then type:

md5 “Windows 10.iso

Wait for a moment until it finish checking. Don’t forget to change Windows 10.iso with file you want to check.

 

If you find this article helpful please share it. 🙂

Leave a Reply

All fields marked with an asterisk (*) are required