Check MD5SUM of Image File in Linux

Posted on

Some of the files which is used in our daily life especially those files consists of installation of a specific operating system are in ISO image format.  Moreover, the size of those files most of them are large. Because the size is not your average file which normally exists as one single file it also tends to corrupt.

Especially if those files acquired from download process from any link across the internet or any kind of copy process from other media such as folder sharing over the network , there will be slight a chance that those files corrupt and cannot be used in a normal way.

We also cannot guarantee that the source which is provided by other third-party websites which redistribute the source can be trusted.

So, in order to check the integrity of those ISO files whether it is the original files that work normally and fine, we can use the command which is available in any Linux distribution operating system to deal with it.

Let’s say that I want to check the integrity of the ISO image file of Ubuntu Server operating system which is called ubuntu-14.04.4-server-amd64.iso. We can do it after we retrieve the whole file and run the following command :

md5sum [ISO-Image-file-name]

For an example :

username@hostname:~$ md5sum ubuntu-14.04.4-server-amd64.iso
2ac1f3e0de626e54d05065d6f549fa3a  ubuntu-14.04.4-server-amd64.iso

username@hostname:~$

To prove that the file itself is not corrupted, we can check it in the official website of the ISO Image file where it is provided to be downloaded.  The other way is to search it in any search engine available such as Google.  Just type it “ubuntu-14.04.4-server-amd64.iso md5sum“ in Google for an example we will be directed in the official site of Ubuntu in this link  and it can be accessed when this article was posted in 21st April 2016.

The site itself display a link to MD5SUMS file which can be downloaded and is displaying the exact md5sum output should be if we want to make sure that the already downloaded file can be used normally.  We can access it in this link

It contains following content :

807fa1f246b719d28d0b362fd2f31855 *ubuntu-14.04.4-desktop-amd64.iso
51b53fa15c0b89948bbaba311d64a962 *ubuntu-14.04.4-desktop-i386.iso
2ac1f3e0de626e54d05065d6f549fa3a *ubuntu-14.04.4-server-amd64.iso
29c5c14450976fb1941e147382a559f5 *ubuntu-14.04.4-server-i386.iso
b31731ea6cdbebe1d02f8193db420886 *wubi.exe

As you can see that the content of md5sum displayed in MD5SUM file is exactly the same with the one which is produced by executing md5sum ubuntu-14.04.4-server-amd64.iso as stated in the above explanation.

If you found that it is not the same,  you better download it again or retrieve the new one until you have the exact same md5sum output with the one displayed in file MD5SUM or any file which is used to declare the correct md5sum value of the file associated with.

 

Leave a Reply