How To Check A File’s Checksum in macOS

Brent | 05 August, 2017 12:12 pm



While the internet has brought about plenty of facilities in our lives, it’s increasingly common use does not come without its negative sides. As the use of internet becomes as commonplace as ever, the security issues rise as well. It has become just as easier for hackers to put forth files with viruses that embed themselves into your system once it downloads, or for any file to be corrupted or changed while in the process of being downloaded. How do you, in such a case, ensure the integrity of a downloaded file? The answer lies in the checksum.

A checksum is a code consisting of a series of characters that a website would give to you in order to ensure the integrity of the files that you download from them. You can do so by downloading the file, generate the local checksum on your own computer, and then compare it with the checksum that is given on the website. If both the values match character to character, it builds upon the fact that the file you downloaded was not modified in the downloading process and is exactly as the source intends it to be. While on the other hand, if both the checksums do not match, then it can be concluded that the integrity of the file has been corrupted during the download and that it is likely to be corrupted or faulty.

Some websites may offer their own services for you to test the checksum of the file after you have downloaded it but what do you do if they do not offer any such tools? If you are an Apple Mac user, here is your answer:

The Terminal app is already present in Mac computers which can be used to check the local checksum of a downloaded file meaning you do not need the help of any online checksum generators or applications for this purpose. You can simply follow the following steps and generate the desired checksum to compare:

First of all, download the targeted file from the website onto your Mac. I, for example, downloaded the WinMD5 tool, which is available for free, in order to check out its checksum and the Mac Terminal. They had the checksum available on their website to which i could compare my locally generated checksum.
Click on the Launchpad that is located on the dock of the Mac and then select Terminal which will subsequently open it up for you.
First, type in the command ‘md5’ in the Terminal once it has been launched, then press the spacebar, and lastly type the path to the downloaded file. You can either type the full path yourself if you are aware of it, or can simply drag and drop the file into the Terminal window which will cause the full path of the file to appear instantly. Then you may press Enter for the Terminal to begin working.
The Terminal instantly generates the checksum for the targeted file and displays it for you to observe. It is generally a string of letters and numbers located at the end.
You may now compare this locally produced checksum to the one provided on the website of the file and take note of any differences.
If there are no differences in the two strings of text, then you are good to go. However, if you find both to differ from each other, it means that the file is corrupted or modified.

By using the Terminal on your Mac you can very easily figure out the integrity of any file that you download in a matter of minutes and a few simple steps as explained above. No longer do you have to worry about modified files entering your system and being faulty or causing harm.

Leave a Reply

Your email address will not be published. Required fields are marked *