How to check MD5 hash and create checksum file in Windows and Linux?

Posted on February 19, 2009 by 1 comment

MD5 is a widely used cryptographic hash function with a 128-bit hash value. It is commonly used to check the integrity of files.

If you downloaded a file from the web and the file owner provided a MD5 hash (checksum) then you can compare the hash of the downloaded file with the hash provided by file owner. So you will know you have got the exact copy of the file without any error. And of course you can provide MD5 hash for your own files if you want.


In Windows I use an open source software HashCheck for MD5 hash verification and creation.

Download HashCheck from here and install it.

1, MD5 hash verification

HashCheck is a shell extension for Windows Explorer, it will add a “Checksums” tab to the shell’s file properties dialog so that you could easily check the hash of a file from Windows Explorer.

In the following example I checked the hash of file with HashCheck.

As you can see in the above screenshots my copy of Joomla upgrade patch is correct.

If the file owner provides the MD5 hash stored in a checksum file such as file.md5, just double-click on the checksum file, and HashCheck will check it.

2, Checksum file creation

You can also create hash/checksum file of your files with HashCheck.

Select the files and directories that you want to hash and create a checksum file for, right-click on them, and select “Create Checksum File”. Double-click on the created checksum file and you will see the hash(es).

HashCheck supports the CRC-32 (in SFV format), MD4, MD5, and SHA-1 algorithms.


1, MD5 hash verification

In Linux the verifying process is more easy.

Open a terminal and type:

md5sum /your/directory/yourfile

Press enter and you will see the MD5 hash. Compare it with the MD5 hash provided by the file owner.

In my case:

md5sum /home/laja/Downloads/Progik/

the output:

4e9e98fb058253f6f87d54fbcacf8466  /home/laja/Downloads/Progik/Joomla_1.5.6_to_1.5.9-

The MD5 hash: 4e9e98fb058253f6f87d54fbcacf8466

My copy of Joomla upgrade patch is correct, look at the screenshot of my Ubuntu desktop:

If the file owner provided the MD5 hash stored in a file such as file.md5, you can simply verifying the MD5sum:

md5sum -c /your/directory/file.md5

If it is correct, it will produce this output:


Note: make sure that the file and the corresponding .md5 checksum file are downloaded in the same directory otherwise the test will fail.

2, Hash/checksum file creation

If you want to provide hash value of your file, it is simple:

md5sum yourfile

This command generates a 32-bit MD5 hash value of “yourfile”, press enter and you will see the hash (this is a sample output only):

4e9e98fb058253f6f87d54fbcacf8466 yourfile

If you want to store the MD5 hash in a checksum file, open a terminal and go to the directory where your file is located:

cd /your/directory/

Create the checksum file:

md5sum yourfile > yourfile.md5

and make a test verification:

md5sum -c yourfile.md5

the output:

yourfile: OK

Tags: , , , , , , , ,

One Response to “How to check MD5 hash and create checksum file in Windows and Linux?”

  1. Dino Aug 20, 2011 #

    “Checksums calculator” is a GUI tool to calculate and verify md5, sha1, sha256, sha384, sha512 witch can run under Linux, Windows and MacOS X operating systems on both 32 and 64bit architectures. You may find more info and download here:

by Transposh - translation plugin for wordpress


Visitor Map

Recent Readers