# md5sum Cheatsheet - Launch Pad

__ _______________________ _________._________________________ \_ _____/ \______ \ / _ \ / _____/ / _____/ | | \_ _____/ | __) | _/ / /_\ \ / \ ___ / \ ___ | | | __)_ | \ | | \ / | \ \ \_\ \ \ \_\ \ | |___ | \ \___ / |____|_ / \____|__ / \______ / \______ / |_______ \ /_______ / \/ \/ \/ \/ \/ \/ \/
← Back to Cheatsheets

# md5sum Cheatsheet

Quick reference for `md5sum`, a tool to compute and verify MD5 checksums. MD5 is considered cryptographically broken; use it only for legacy integrity checks, not for security.

## Basic usage

- `md5sum file.iso` – print MD5 hash and filename.
- `md5sum file1 file2 file3` – hash multiple files.
- `echo -n "test" | md5sum` – hash data from stdin.

## Common options

- `-b` – read files in binary mode (default on Linux).
- `-t` – read files in text mode (mainly for non-Unix systems).
- `-c` – check MD5 sums from a file.
- `--tag` – create BSD-style output (`MD5 (file) = hash`).

## Creating and verifying checksum files

- `md5sum file.iso > file.iso.md5` – save checksum.
- `md5sum file1 file2 > checksums.md5` – create checksum list.
- `md5sum -c file.iso.md5` – verify a single file.
- `md5sum -c checksums.md5` – verify multiple files.

## Tips

- Use `sha256sum` or `sha512sum` for security-sensitive integrity checks.
- When hashing from `echo`, remember `-n` to avoid including the newline.
- Checksum files are just text; you can version them in git or share them alongside downloads.