On Unix-like operating systems, the md5sum command computes and checks an MD5 message digest, a string representing the cryptographic hash of data encrypted with the MD5 algorithm.

This page describes the GNU/Linux version of md5sum.

Description

The md5sum computes, and prints or verifies, MD5 128-bit checksums contained in a specified FILE.

  • Description
  • Syntax
  • Examples
  • Related commands
  • Linux commands help

If FILE is not specified, or if FILE is specified as - (a dash), md5sum reads the encrypted message digest from standard input.

Syntax

md5sum [OPTION]… [FILE]…

Options

The following four options are useful only when verifying checksums:

The MD5 algorithm is considered insecure compared to more robust encryption algorithms, such as SHA-224, SHA-256, SHA-384, and SHA-512.

There is no difference between binary and text mode option on GNU system.

The sums are computed as described in RFC 1321. When checking, the input should be a former output of this program. The default mode is to print a line with checksum, a character indicating input mode (’*’ for binary, space for text), and name for each FILE.

Examples

md5sum example.iso

Running the above command would give the md5 checksum of the example.iso file in the current directory. Below is an example of how the output may appear with the full md5 checksum followed by the file name.

d41d8cd98f00b204e9800998ecf8427e example.iso

sha224sum — Checks the SHA224 message digest.sha256sum — Checks the SHA256 message digest.sha384sum — Checks the SHA384 message digest.sha512sum — Checks the SHA512 message digest.