How to verify checksums in Linux?

Method 1: Using GtkHash Application

Step 1: Open the GtkHash app that you just downloaded, you should now see the home screen of GtkHash.

GTK Hash

Step 2: Open the app and go to edit>preferences and select all the algorithms you want to check for, the default layout should serve you well for general purposes, but if you want to customize a bit, you can select all the algorithms that you wish to check against.

Selecting Preferences

Step 3: Browse the file of which you want to verify the checksum by clicking against the “File” box and browsing for it.

Browse the file

Step 4: Copy and Paste the original checksum value from the website or file to the “Check” box.

Pasting the checksum from the website or file to GTK Hash

Step 5: Click on “hash”. Now it will compute the hash of the file. in our case, it will compute SHA256, SHA1, MD5 and CRC32, as we set the default values in the preferences.

Click on hash

Step 6: If any one of the file’s hash matches the value you copy-pasted, then it will show a checkmark next to it as you can see in the image below.

Check mark showing against the matched

Method 2: Terminal method

To verify checksums in Linux using the terminal you should follow the following steps:

Step 1: Open the folder where you have the program or file stored in the terminal.

Step 2: Now verify the hash

As an example, we will be verifying Linux mint XFCE’s disk image using different algorithms

1. Verifying SHA256 checksum:

Sha 256 is the most popular checksum for verification purposes, so it is very likely that you may find it on the website of the file that you just downloaded. To verify the Sha256 checksum enter the following command into the terminal.

sha256sum "filename"


For our example it would be:

sha256sum linuxmint-21.1-xfce-64bit.iso


Verifying SHA256

2. Verifying SHA1 checksum:

As discussed earlier researchers have found collision in this algorithm and you may not find it on the website of the software, but if for some reason, you only have SHA1 to verify, then here is the command.

sha1sum "filename"


Verifying SHA1

3. Verifying MD5 checksum

Like SHA1, finding MD5 on a website is rare but if you only have that then enter this command into the terminal.

md5sum "filename"


Verifying MD5

Step 3: Now, compare the output you got in the terminal with the checksum given in the website or file. If both are the same then the integrity of the file is verified.

Comparing the output with the checksum in the text file



How to Check a File Checksum in Linux

You just downloaded the latest version of your favorite distribution’s disk image and you are all ready to flash it to your USB and experience the latest and greatest, sounds great right? yeah, but before you press the install button there is an important verification step that helps to check the integrity of your file – Verifying Checksum.

Similar Reads

What is Checksum?

Checksum, in simple terms, is a string of numbers derived from a file (which could be any software, movies, images, or documents) using a checksum algorithm. This should always produce the same string of numbers for the same file across devices and if there is even the smallest change within the file then the checksum of that particular file will be different. Two different files “ideally” can’t have the same checksum as two people can’t have the same fingerprint....

How to Install GTK Hash in Linux?

Method 1: Graphical method...

How to verify checksums in Linux?

Method 1: Using GtkHash Application...

Contact Us