[md5sum] Check integrity of downloads
A small tutorial for the program "md5
" or "md5sum
" commonly called "checksum".
utility is use to calculate what is called the fingerprint of a file. ( the checksum is a value of 128 bits corresponding to a checksum calculated from the archive).
An MD5 checksum is not intended to guarantee the provenance of a file or file group. His interest is to verify the integrity of retrieved data. Indeed, no one is immune from disturbance or a network problem which results in the corruption of an archive is being downloaded.
Using command line
First download version
- Unpack the archive into a folder at the root of 'C'. In our example we will name "md5sum".
- Open a console MSDos.
- Start> Run>
- Type cmd (W2K or XP) or command (on Win98) and press [Enter] on your keyboard.
- Change to the directory containing the"md5.exe" file in command line.
C:\> cd md5sum [Enter]
If however you were not at the root of your hard drive, type: cd then [Enter].
Make sure the "md5.exe" file is there:
C:\md5sum>dir /w /p [Enter]
[.] [..] index.html main.c
md5.c md5.exe md5.gif md5.h
md5.vcproj rfc1321.html rfc1321.txt
11 file(s) 157 564 bits
2 Dir(s) 6 791 827 456 bits libres
Then run the following command:
md5 'The_complete_path_to_your_Iso_image' [Enter]
Assuming that our image file is in "D: \ image_isoSmoothwall"
C:\md5sum>md5 D:\image_isoSmoothwall\smoothwall-2.0-metro.iso [Enter]
After a few seconds you should have the following result:
Use the "-n" if you do not want to have the name and path of the image displayed after the comparison:
C:\md5sum>md5 -n D:\image_isoSmoothwall\smoothwall-2.0-metro.iso [Enter]
You just have to compare the result obtained with the "md5.txt" file, or "iso.md5 ..." or even "... iso.md5.asc", downloaded along with your "iso" image.
Another method is to place the program "md5" or "md5sum" (depending on the program downloaded) in one of the following directory:
- C:\windows\command\ (for Windows 95/98/Me)
- C:\winnt\system32\(for Windows 2000)
- C:\windows\system32\ (for Windows XP, Vista et 7)
You can from this point call the "md5" or "md5sum" command (from the MSDos command prompt) directly from the directory containing the .iso image.
D:\image_isoSmoothwall>md5 -n smoothwall-2.0-metro.iso [Enter]
Via a graphical user interface "GUI"
Download MST MD5
Once installed, launch it, a small GUI will open prompting you to:
"Simply drag the file on this window to see the MD5 checksum"
That's it. You have nothing else to do but wait (less than a minute at most, depending on the size of the file).
- Select the file to be checked,
- Click on [Calculate]
- Copy the key that was provided into the comparaison field.
- Click [Compare] to compare the different values.
- The result is displayed in a window confirming the authenticity of the file scanned.
In console mode
The md5sum usually comes (by default) with most distribution. If, however,it is not present, refer to the following address to download a compressed archive:
, all you have to do is to go to the directory containing your file to verify and type the following command:
The result should appear after a few seconds as follows (same as in Windows):
If you don't want to go to the directory containing the file to be checked, you can also specify a path like this:
Remember to use the "completion" (press the TAB key) to complete your command lines.
Via a Graphical User Interface
There is a project called Parano
offering a GUI for the creation/editing/checking MD5 or SHA-1 under Gnome.
The project seems to be discontinued, but still it may be helpful
Generate a MD5 sum
For Windows and GNU/Linux
To generate an MD5 sum, you must simply perform the same operation as the verification, namely:
md5sum filename [Enter]
The filename can be any type of file (archive, images, text, iso, executable, etc.. etc..).
On Windows, the command is not always present natively.
If you want to create a text file (my_file_md5sum.txt), you must redirect the output of the md5sum command to the text file itself instead of standard output, namely the screen. Use the redirector ">", common to Windows and GNU/Linux.
filename md5sum> my_file_md5sum.txt [Enter]
Original FAQ by jipicy
Original article published by jipicy
. Translated by jak58
. - Latest update by jad05