How to Run an MD5 or SHA-1 Hash on OS X

Previously, we learned how to run MD5 or SHA-1 hashes on files in Windows. That entailed downloading and installing a separate piece of software. Luckily for Mac users, these functions are built in and can be accessed via Terminal!

MD5 Hashes:

  1. Open “Terminal.” It can be found at /Applications/Utilities/Terminal
  2. Type cd followed by the directory in which the file you’d like to test resides. For example:
    • cd ~/Desktop
  3. Simply type md5 yourfile.extension and hit enter. For example:
    MacHash3

    • Note: It’s common for file extensions to be hidden by default, so don’t forget to include those.

SHA-1 Hashes

  1. Follow steps 1 and 2 from above.
  2. Simply type shasum yourfile.extension and hit enter. For example:
    MacHashSHA1