• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

md5sum: command not found

by admin

The md5sum command is used to calculate the hash value of a file or standard input using the MD5 hash function. You can also use the -c option to specify a file containing MD5 hashes and the file names they apply to; md5sum will calculate the hashes of the files listed, and then compare them to the hash values listed. The results will let you know if each file passed, failed, or could not be found.

MD5 hashes are 128-bits in length. Like many other hash values, they are typically represented in hexadecimal format (32 characters for MD5). The following is the hash value of the string “Linux”:

edc9f0a5a5d57797bf68e37364743831

Syntax

The syntax of the md5sum command is:

# md5sum [options] [file name]

If you encounter the below error while running the md5sum command:

md5sum: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
OS X brew install md5sha1sum
Debian apt-get install coreutils
Ubuntu apt-get install coreutils
Alpine apk add coreutils
Arch Linux pacman -S coreutils
Kali Linux apt-get install coreutils
CentOS yum install coreutils
Fedora dnf install coreutils
Raspbian apt-get install coreutils

md5sum Command Examples

1. Calculate the MD5 checksum for a file:

# md5sum path/to/file

2. Calculate MD5 checksums for multiple files:

# md5sum path/to/file1 path/to/filen2

3. Calculate a MD5 checksum from the standard input:

# echo "text" | md5sum

4. Read a file of MD5SUMs and verify all files have matching checksums:

# md5sum --check path/to/file.md5

5. Only show a message for missing files or when verification fails:

# md5sum --check --quiet path/to/file.md5

6. Only show a message for files for which verification fails, ignoring missing files:

# md5sum --ignore-missing --check --quiet path/to/file.md5

Filed Under: Linux

Some more articles you might also be interested in …

  1. Linux OS Service ‘syslog’
  2. iftop Command Examples in Linux
  3. electron-packager: A tool used to build Electron app executables for Windows, Linux and macOS
  4. “git-imgerge” Command Examples
  5. exrex: Generate all/random matching strings for a regular expression
  6. chronyc Command Examples in Linux
  7. head Command Examples in Linux
  8. Linux OS Service ‘anacron’
  9. rc-service Command Examples in Linux
  10. calendar: Display upcoming events from a calendar file

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright