Whenever you are downloading a file from the internet, more often than not, the developer gives you or shows you the MD5 or SHA checksum of that particular file. This file checksum can be used to check the integrity of the file when you are done downloading. The good thing about checksums is that it is highly unlikely that any two files have the same checksum. If the downloaded file is modified in any way (even a tiny bit) or got corrupted, the checksum automatically changes. In case you are wondering, you can easily check MD5 and SHA checksums directly on your Apple Mac. Here is how you can do it.
Check MD5 Checksum
To check MD5 checksum, you don’t have to install and use any third-party application. You can just use your terminal. To start off, use Spotlight or Launchpad to search for the Terminal and then launch it.
Once the Terminal has been launched, use the blow command while replacing “filePath” with the actual file path in your local storage and press the Return key on your keyboard. For instance, I want to check the MD5 checksum of the downloaded Linux Mint ISO. So I entered the file path of that target file.
Quick tip: to enter the file path, simply drag and drop the file in the Terminal. This action will automatically populate the file path.
md5 filePath
As soon as you press the Return key, your system will calculate the MD5 checksum and will display it.
Once you have the checksum, head over to the developer website and verify the checksum.
Check SHA Checksum
Just like you can check MD5 checksum, you can also check SHA checksum right in the Terminal.
To do that open up the Terminal and execute the below command while replacing “filePath” with the actual file path in your local storage. Again you can simply drag and drop the file in the terminal to autofill the file path. For instance, here I am checking the SHA checksum of the VLC disk image file downloaded from the official VLC website.
shasum filePath
As soon as you execute the command, the terminal shows the actual SHA checksum of the target file.
Once you have the SHA checksum, simply cross check it with the checksum available on the developer website and you are good to go.
That’s all there is to do and hopefully that helps. Do comment below sharing your thoughts and experiences about using the above method to check MD5 and SHA checksums on Mac.