Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.

com/checksum-tools-guide-linux/

It's FOSS  MENU

You are here: Home / How To / How To Verify Checksum In Linux [Beginner Guide]

How To Verify Checksum In Linux


[Beginner Guide]
Last updated April ��, ���� By Munif Tanjim — �� Comments

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

1 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

Brief: This beginner’s guide tells you what is checksum, what are md�,
sha��� or sha-� checksum, why is checksum used and how to verify
checksum in Linux.

What is Checksum?
Checksum is like a digital �ngerprint of a �le. In technical terms,

A checksum is a small-sized datum from a block of


digital data for the purpose of detecting errors which
may have been introduced during its transmission or
storage.

Well, checksum is a long string of data containing various letters and


numbers. You’ll generally �nd them while downloading �les from
the web, e.g. Linux distribution image, software packages etc.

Most common use of checksum is in checking if the downloaded �le is


corrupted.

For instance, Ubuntu MATE download page includes SHA��� checksum


for every image available there. So, after you downloaded an image, you
can generate SHA��� checksum for it and verify if the checksum value

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

2 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

If it doesn’t, that will mean your downloaded image’s integrity is


compromised (maybe it was corrupted during the download process). We
will use Ubuntu Mate “ubuntu-mate-��.��-desktop-amd��.iso” image
�le for this guide.

How is Checksum generated?


Checksum is generated by checksum algorithm. Without going into
technical details let’s say that it takes a �le as input and outputs the
checksum value of that �le. There are various algorithms for generating
checksum. Most popular checksum algorithms are:

Secure Hash Algorithms and variants (SHA-�, SHA-� etc.)


MD� Algorithm

Let’s see how to verify checksum in Linux.

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

3 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

How to Verify Checksum in Linux [GUI and Command Line]

SUBSCRIBE TO OUR YOUTUBE CHANNEL FOR MORE LINUX VIDEOS

How to use checksum to verify �le


integrity [GUI way]
If you are looking for graphical solution, you can use GtkHash.

GtkHash is a nifty tool for generating and verifying various checksums. It


supports a wide range of checksum algorithms – including SHA, MD�

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

4 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

GtkHash supported Checksum Algorithms

Installing GtkHash on Ubuntu


For installing GtkHash on your Ubuntu system, simply run the following
command:

sudo apt install gtkhash

That’s it.

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

5 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

Suggested read Peppermint OS � Is released

For selecting the checksum algorithms to use:

Go to Edit > Preferences menu option.


Select the ones you would like to use.
Hit Close button.

By default – MD�, SHA-� and SHA��� is selected.

Using GtkHash
Using it is quite straight-forward.

Select the �le you want to check


Get the Checksum value from the website and put it in Check box.
Click the Hash button.
This will generate the checksum values with the algorithms you
selected.
If any one of them matches with the Check box, it will show a small
tick sign beside it.

Here’s an example showing GtkHash generating checksum for


UbuntuMATE iso image (ubuntu-mate-��.��-desktop-amd��.iso):

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

6 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

GtkHash with UbuntuMATE iso

Verify checksum in Linux


command line
Every Linux distribution comes with tools for various checksum
algorithms. You can generate and verify checksum with them. The
command-line checksum tools are the followings:

MD� checksum tool is called: md�sum


SHA-� checksum tool is called: sha�sum
SHA-��� checksum tool is called: sha���sum

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

7 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

them uses similar command formats. Let’s see an example of using


sha���sum. We will use the same “ubuntu-mate-��.��-desktop-
amd��.iso” image �le as we used before.

Generating and Verifying SHA256 Checksum


with sha256sum
First go to the directory where the .iso image is stored:

cd ~/itsfoss

Now, for generating SHA��� checksum, enter the following command:

sha256sum ubuntu-mate-16.10-desktop-amd64.iso

You will get the SHA��� checksum in your terminal window! Easy, isn’t
it?

Generating SHA��� Checksum for UbuntuMATE iso

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

8 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

If the generated checksum matches with the one provided on the


UbuntuMATE download page, that will mean – no data was
changed while you downloaded the �le or putting otherwise, your
downloaded �le is not corrupted.

The other mentioned tools work similarly.

How accurately does this work?


If you are wondering, how accurately does these checksum detects
corrupted �les – if you delete or change even one character from any one
of the text �les inside the iso image, the checksum algorithm will
generate a totally di�erent checksum value for that changed iso image.
And that will de�nitely not match with the checksum provided on the
download page.

Suggested read Play Multiplayer Tron Arcade Game In Linux Terminal

Do you checksum?

One of the suggested steps while installing Linux is to verify the


checksum of Linux ISO. Do you always follow this step or do it only when
something goes wrong with the installation?

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

9 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

to help.

Like what you read? Please share it with others.

297
Shares

Filed Under: How To


Tagged With: Beginner Guide, checksum, gtkhash, Guide, hash, How To, Linux,
md�, sha-�, sha-���, Ubuntu, verify

About Munif Tanjim


Munif is studying Electronics & Telecommunication Engineering.
He loves Open Source and uses Ubuntu as his primary OS.
Technology aside, Munif is a TV Series freak and sometimes tries to do some
creative writing.

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

10 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

Don’t �nd what you are looking for?


SEARCH THIS WEBSITE

161.9K Followers

Follow us on Facebook
114.3K
 Followers

Follow us on YouTube
23.4K
 Followers

Follow us on Twitter
8.3K
 Followers

Follow us on Instagram
15.7K
 Followers

Follow us on Reddit
102
 Followers

Subscribe to Weekly Newsletter


Sign up for FREE weekly
newsletter

About Pages
Join an exclusive community of over 75,000 other
Linux learners to become a better Linux user.

About It's FOSS


ENTER YOUR EMAIL....
Meet the team
Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

11 of 12 4/26/19, 9:56 AM
How to Verify Checksum in Linux [MD5, SHA256... https://itsfoss.com/checksum-tools-guide-linux/

Contact Pages
I agree to receive emails from It's FOSS.

Contact Us

Get Featured on It's FOSS

Request a tutorial

Stay in Touch with It's FOSS


Follow us on Facebook

Follow us on Instagram

Follow us on Pinterest

Follow us on Twitter

Follow us via RSS Feed

Subscribe to Newsletter

Subscribe to YouTube Channel

COPYRIGHT © 2019 IT'S F.O.S.S (PART OF CHMOD777 MEDIA TECH PVT LTD)· BUILT ON GENESIS
FRAMEWORK AND POWERED BY UPCLOUD

Just so that you know, we use cookies on our Ok, got it!
website. Want to know more? Click here.

12 of 12 4/26/19, 9:56 AM

You might also like