Which Linux commands are commonly used to compute file hashes such as SHA-256, MD5, and SHA-1?

Enhance your cyber defense skills with the Security Blue Team Level 1 Test. Prepare with flashcards, multiple choice questions, and detailed explanations to ace your exam!

Multiple Choice

Which Linux commands are commonly used to compute file hashes such as SHA-256, MD5, and SHA-1?

Explanation:
Computing file hashes on Linux is done with dedicated sum utilities that implement common algorithms like MD5, SHA-1, and SHA-256. The standard tools are sha256sum, md5sum, and sha1sum, each producing the hex digest for a file (and the file name) when run, for example: sha256sum myfile.txt. These commands are part of GNU coreutils and are designed to help verify integrity by comparing the generated digest to a known value or by using a checksum file with --check. The other options aren’t standard Linux commands for computing these hashes (get-filehash is not a typical Linux tool; it resembles PowerShell usage, while hashsum and hashfile are not standard GNU utilities).

Computing file hashes on Linux is done with dedicated sum utilities that implement common algorithms like MD5, SHA-1, and SHA-256. The standard tools are sha256sum, md5sum, and sha1sum, each producing the hex digest for a file (and the file name) when run, for example: sha256sum myfile.txt. These commands are part of GNU coreutils and are designed to help verify integrity by comparing the generated digest to a known value or by using a checksum file with --check.

The other options aren’t standard Linux commands for computing these hashes (get-filehash is not a typical Linux tool; it resembles PowerShell usage, while hashsum and hashfile are not standard GNU utilities).

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy