Check Integrity of Downloads with md5sum

The md5sum utility is used to calculate what is called the fingerprint of a file. A small tutorial for the program "md5" or "md5sum" commonly called "checksum". ( 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 filegroup. His interest is to verify the integrity of the retrieved data. Indeed, no one is immune from disturbance or a network problem which results in the corruption of an archive is being downloaded.

Windows

Using Command Line

First download version for Windows

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"md5e" file in command line.

C:> cd md5sum [Enter]

If however you were not at the root of your hard drive, type: cd then [Enter].

C:md5sum>

Make sure the "md5e" file is there:

C:md5sum>dir /w /p [Enter]

[.] [..] index.html main

md5 md5e md5.gif md5.h

md5.vcproj rfc1321.html rfc1321t

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]

Example:

Assuming that our image file is in "D: image_isoSmoothwall"

C:md5sum>md5 D:image_isoSmoothwallsmoothwall-2.0-metro.iso [Enter]

After a few seconds you should have the following result:

D0AB11311B866B2332E92479906F2FF9 D:Linuximage_isoSmoothwallsmoothwall-2.0-metro.iso

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_isoSmoothwallsmoothwall-2.0-metro.iso [Enter]

D0AB11311B866B2332E92479906F2FF9

You just have to compare the result obtained with the "md5t" file, or "isod5 ..." or even "... isod5.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:windowscommand (for Windows 95/98/Me)

C:winntsystem32(for Windows 2000)

C:windowssystem32 (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.

Example:

D:image_isoSmoothwall>md5 -n smoothwall-2.0-metro.iso [Enter]

D0AB11311B866B2332E92479906F2FF9

Via a Graphical User Interface "GUI"

mst MD5

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).

WinMD5

Download WinMD5

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.

GNU/Linux

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:

Under GNU/Linux, all you have to do is to go to the directory containing your file to verify and type the following command:

$md5sum filename [Enter].

The result should appear after a few seconds as follows (same as in Windows):

D0AB11311B866B2332E92479906F2FF9 filename

If you don't want to go to the directory containing the file to be checked, you can also specify a path like this:

$md5sum /home/user/download/filename [Enter]

Note that:

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]

Note: 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_md5sumt), 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_md5sumt [Enter]

Image: © Patrick Amoy - Unsplasom

Spread the love

Leave a Comment