Friday, September 12, 2008

How to do md5sum check

"md5sum is a computer program that calculates and verifies 128-bit MD5hashes, as described in RFC 1321. The MD5 hash (or checksum) functions as a compact digital fingerprint of a file." ~Wikipedia
In simple words, if you download a file from a web site and the md5sum result matches the one provided by the web site, your file has practically been downloaded OK.(There is always a theoretic probability that 2 different files can have the same md5sum)

So, how do we do this md5sum?

On Linux it is very easy, as most distributions include the program needed.
Open a terminal and type:
md5sum ubuntu-8.04.1-desktop-i386.iso
Replace the ubuntu-8.04.1-desktop-i386.iso with the file you want to check.

This will produce something like this:
8895167a794c5d8dedcc312fc62f1f1f ubuntu-8.04-desktop-i386.iso

Compare that result with the one provided on the website and if they are
exactly the same,your file has no problem.
Unless you fall victim to Murphy's Law!!

Just a note on Downloading and checking files when using Firefox.
Usually the default setting is to download files to the Desktop. When
you want to do a md5sum on a iso file like Puppy which is now on your
Desktop.

Open Terminal
Type cd Desktop
Hit Enter
you should now have: ~/Desktop$ with the flashing cursor
displayed now in Terminal
Type md5sum ubuntu-8.04-desktop-i386.iso
Hit Enter

Your numbers will come up after a few seconds depending on
how large the file is, be patient.


To md5sum a file in Windows you need to use a utility such as:
md5sum.exe

Advanced CheckSum Verifier
winmd5sum





3 comments:

rokytnji said...

Just a note on Downloading and checking files when using Firefox. Usually the default setting is to download files to the Desktop. When you want to do a md5sum on a iso file like Puppy which is now on your Desktop.

Open Terminal
Type cd Desktop
Hit Enter
you should now have: ~/Desktop$ with the flashing cursor displayed now in Terminal
Type md5sum name of file on desktop
Hit Enter

Your numbers will come up after a few seconds depending on how large the file is, be patient.

You can compare your numbers with the copied md5sum numbers you have copied and pasted into Text Editor from the Website you have Downloaded your file from. Save the Text Editor md5sum document to your desktop. Now just copy your md5sum readout in your terminal window, open your md5sum Text Editor Document, and paste your Terminal md5sum readout directly below the other md5sum numbers you have pasted in the document. Compare and they should line up perfectly, numbers and letters. If not you either copied the wrong md5sum from the website you downloaded from or you had a corrupted download when you downloaded the file.

rokytnji said...

On my post when I said Type md5sum name of file on desktop. I couldn't put name of file on Desktop in brackets. Posting wouldn't let me. So Name of file on Desktop means THE EXACT NAME OF THE FILE ON YOUR DESKTOP that was downloaded from site.

L4Linux said...

Good comment rokytnji, it is now included in the article.