How to Check MD5 Hash on Linux ? December 2, 2010Posted 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,
and it will produce something like this:
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
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.