Checking ISO and/or File Images via CLI

Reading Time: 1 minute

If you have downloaded an iso or image and you want to check that image/iso hasn’t been tampered or corrupted. Ubuntu has a md5 and sha hash checker pre-installed within the OS.

For MD5 checking you will use md5sum

md5sum path/to/image

[email protected]:/tmp$ md5sum ubuntu-14.04.2-server-amd64.iso 
83aabd8dcf1e8f469f3c72fff2375195  ubuntu-14.04.2-server-amd64.iso

For Sha checking, you will use one of the below (depending on the hashing value)

[email protected]:~$ sha
sha1sum       sha256sum     sha512sum     shasum        
sha224sum     sha384sum     shadowconfig

sha1 path/to/image

[email protected]:/tmp$ sha1sum ubuntu-14.04.2-server-amd64.iso 
3bfa6eac84d527380d0cc52db9092cde127f161e  ubuntu-14.04.2-server-amd64.iso

You then can check the md5/sha hashes against the known correct has values. If they match (which these do):

Screenshot 2015-07-03 09.19.05
Screenshot 2015-07-03 09.18.39

 

 

 

 

 

 

 

 

You are good to go, knowing you have a legit version! πŸ˜€

The following two tabs change content below.

Keeran Marquis

Network Engineer
Keeran Marquis is a Network Engineer. His main goal is to learn everything within the Networking field, pick up a little bit of scripting, be a poor man sysadmin and share whatever he knows! All Posts are his own views, opinions and experiences, no guarantees they will work for you but point you in the right direction πŸ™‚
Share this:
Share

2 thoughts on “Checking ISO and/or File Images via CLI”

  1. Md5 online

    Hi:

    I have a new website for md5 online generation that you can use in one step without creating a php file. ItΕ› very useful for md5 hash generation on the fly.

    Great blog!

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.