jump to navigation

How to Check MD5 Hash on Linux ? December 2, 2010

Posted by Tournas Dimitrios in Linux.

MD5 is a message digest algorithm that takes a message of arbitrary length and produces a 128-bits digital signature of the message. It is most widely used for verifying the integrity of the file downloaded from the Web. Since it is almost impossible to produce the same digital signature from different message, by simply comparing the MD5sum of the downloaded file and the MD5 hash provided by the owner, you will know if you have downloaded the exact copy of the file without any error.
In Linux, verifying the Md5sum is easy.

For example, let say you have downloaded the CentOS-5.5-i386-LiveCD-Release2.iso and its MD5 file. To check the MD5sum, in your terminal,

md5sum  CentOS-5.5-i386-LiveCD-Release2.iso

and it will produce something like this:
1b5d7e5ff8f1d90c600a973a8e000877 CentOS-5.5-i386-LiveCD-Release2.iso
Now, open up the MD5 file (with your text editor) and compare the 32 characters string with the one shown above. If all the figures are correct, then the integrity of your downloaded file is intact.

If the above MD5 hash is stored in the file such as CentOS-5.5-i386-LiveCD-Release2.md5sum , you can simply verifying the MD5sum by

md5sum -c  CentOS-5.5-i386-LiveCD-Release2.md5sum

If all is correct, it will produce the message

CentOS-5.5-i386-LiveCD-Release2.iso: ok

While Mac users can do the same thing in the terminal, for those who do not want to get their hands dirty, they can use the software: MD5 Filecheck to check the MD5sum. Simply drop the file to the application icon to display the MD5 hash. You can then verify it with the MD5 file.

For Windows users, there are plenty of software available that allow you to check MD5 hash. A small and easy to use software would be MD5 Check.


No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s