How to check MD5 Hash in Mac OS X or any UNIX-like Operating System

Today, after downloading a new version of a Linux distribution, I needed to check MD5 Hash in order to verify if the ISO file had not any error. This is a common task for IT people, for this reason, I would like to share with you the easiest way to get the MD5 Hash in Mac OS X:

Console-128

1) Open a terminal

2) Use the command: md5 name_of_file for example. My file was: LT-DVD-x86_64-GM-DVD1.iso

md5 LT-DVD-x86_64-GM-DVD1.iso

After running previous command you will obtain an output like this:

MD5 (LT-DVD-x86_64-GM-DVD1.iso) = e79339d7e29405deb09b7d2372dd80f2

3) Compare MD5 obtained with the MD5 Hash published by distributor (it is common that people who upload the file, also upload the MD5 codes). For example, in my case I checked that my Linux was damaged because these codes didn’t coincide 🙁 so it was necessary to download again.

4) An alternative command to get the same result is: openssl md5 name_of_file. As you can seeit doesn’t matter which command you choose, both of them will return the same hash.

openssl md5 LT-DVD-x86_64-GM-DVD1.iso

That’s it!

Be happy with your code!

Alex Arriaga

Leave a Reply

Your email address will not be published. Required fields are marked *