Checking SHA-256 Checksums with certutil, sha256sum, 7-⁠Zip, and Dolphin
Updated  2022-May-16

Page contents

News

2021-November-4  Published this evolving⁠[1] article.

 

Prerequisites

This article assumes you know how to…

  • launch a terminal emulator,

  • identify the command-line shell you are using (Bash, CMD, PowerShell, etc.), and

  • use the command line.

 

Terminology

SHA means Secure Hash Alogorithm.

 

Why I wrote this

I’m in the midst of trying some Linux distributions and for each .iso file I download, I need to check its checksum as part of making sure I don’t install a trojan horse operating system.

 

Command-line tools

In this section I describe how to use two command-line tools (cerutil and sha256sum) that display the SHA-⁠256 checksum of a file named FILENAME.

 

Step 1: Launch a terminal emulator

Launch a terminal emulator and change directory (cd) to the directory that contains FILENAME.

💡

On Windows, the following is an easy way to do this.

  1. In File Explorer locate FILENAME's directory.

  2. Shift+Right Click on a blank region in that directory.

  3. In the pop-up context menu, choose one of the following options.

    • Git Bash Here[2][3]

    • Open PowerShell window here

    • Open in Windows Terminal

    The options you see in this context menu depend on what is installed on your system.

 

Step 2: certutil command (PowerShell and cmd.exe)

In PowerShell or cmd.exe,[4] run the following commands.

  1. To check if the certutil command is available, run where.exe certutil

  2. To check if FILENAME is in the current directory, run dir or dir |more

  3. To display the SHA-256 checksum of FILENAME, run

    certutil -hashfile FILENAME sha256
                       ^^^^^^^^
                       use actual file name here

 

💡
To avoid typing more than the first few characters of FILENAME, you can use tab completion.

 

Step 2 Alternative: sha256sum command (Unix-⁠like shells)

In a Unix-like shell, including Git Bash,[3] run the following commands.

  1. To check if the sha256sum command is available, run which sha256sum

  2. To check if FILENAME is in the current directory, run ls or ls |less

  3. To display the SHA-256 checksum of FILENAME, run sha256sum FILENAME

 

💡
  • To avoid typing more than the first few characters of FILENAME, you can use tab completion.

  • To display the SHA-1 checksum, replace sha256sum with sha1sum above.

 

GUI tools

7-Zip’s right-click context menu

If you have installed the GUI variation of 7-Zip and selected the option called…

    Integrate 7-Zip to shell context menu

…then CRC-SHA > SHA-256 will be available when you Right-click on FILENAME in your GUI file manager.

 

💡
To view and possibly edit 7-Zip’s options, launch 7zFM (7-⁠Zip File Manager) and choose Options… from the Tools menu.

 

Dolphin file manager’s right-click context menu

  1. Right-click FILENAME.

  2. Choose Properties.

  3. Select the Checksums tab.

  4. Next to the checksum you’re interested in (e.g., SHA256), Select Calculate.

 

References

See also

Endnotes


1. Many Infinite Ink articles, including this one, are evergreen and regularly updated.
2. Git Bash Here will be an option if Git for Windows is installed on your system and if you selected Windows Explorer Integration during your G4W setup.
3. To learn about Git Bash, which is part of Git for Windows, see Infinite Ink’s Git Bash Is My Preferred Windows Shell.
4. cmd.exe is also known as CMD and is pronounced “cee em dee.” It’s also sometimes referred to as “Command Prompt.” Details are at Wikipedia’s cmd.exe.

Comments and questions 📝 🤔 👎 👍

Your public comment or question might immediately improve this page or help me to (eventually) improve this page.