Md5sum download and how to use

Md5sum download and how to use

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

What is a MD5 checksum?

An MD5 checksum is a cryptographic hash function that is used to generate a fixed length alphanumeric string representing input data. It is often used to verify the integrity of a file during transfers or downloads by detecting minor changes in the input. It is not secure enough for cryptographic purposes, or vulnerabilities. This is why there is a preference for more secure hash functions, such as SHA-256 or SHA-3. 

How to do a MD5 checksum in Windows?

Using Command Line

First download md5sum 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"md5.exe" file in the 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 "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] 

Example: 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:

D0AB11311B866B2332E92479906F2FF9 D:\Linuximage_isoSmoothwall\smoothwall-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_isoSmoothwall\smoothwall-2.0-metro.iso [Enter]

D0AB11311B866B2332E92479906F2FF9 

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.

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 comparison field.
  • Click [Compare] to compare the different values.
  • The result is displayed in a window confirming the authenticity of the file scanned.

How to do a MD5 checksum in 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

How to generate a MD5 checksum?

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_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]
visit our forum for more windows related issues
Around the same subject