« Notes About Choosing a Linux Distribution⁠🐧︎ Using the Cloud to Sync Dotfiles »

# Checking SHA-256 Checksums with certutil, sha256sum, 7-⁠Zip, and DolphinUpdated  2022-July-4 💥

## News

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

## Prerequisites

• 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 a couple command-line tools (certutil and sha256sum) to display the SHA-⁠256 checksum of a file named FILENAME.

### Step 1: Launch a terminal emulator

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

 💡 On Windows, the following is an easy way to do this.In Windows GUI File Explorer locate FILENAME's directory.Shift+Right Click on a blank region in that directory.In the pop-up context menu, choose one of the following options.Git Bash Here⁠[2]⁠[3]Open PowerShell window hereOpen in Windows TerminalWhat you see in this context menu depends on what’s installed on your system.

### Step 2 (Powershell and CMD): certutil command

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.To display alternate checksums, replace SHA256 with MD2, MD4, MD5, SHA1, SHA384, or SHA512.To get help, run: certutil -hashfile -?

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

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

If the GUI variation of 7-Zip is installed on your system and if this option is set:

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 its 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.

## 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 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.