Quickly produce and verify MD5 checksums from the shell to detect file corruption and simplify integrity checks. 15.02.2026 | reading time: 2 min Want a fast way to verify files on Linux? The md5sum utility computes MD5 hashes from the command line so he can detect accidental corruption, compare files, or automate integrity checks. Hands-on: create and verify a checksum Create a small file, produce a checksum file, and verify the result with these commands, shown as a single script: ```bash echo -n "Hello world" > sample.txt md5sum sample.txt > sample.md5 cat sample.md5 md5sum -c sample.md5 ``` The final line should report "sample.txt: OK" if the file matches its checksum. Practical options and behavior Use md5sum -c to verify lists, -b to mark binary mode and -t for text mode; the output format is "hash filename" and asterisk flags binary mode in checksum files; md5sum reads stdin so you can pipe data like `echo -n "data" | md5sum`; beware that MD5 is fast but broken for cryptographic collision resistance so prefer SHA-256 for security-sensitive verification. Complementary tools to know For stronger or different formats he should use sha256sum for SHA-2 checks, openssl dgst for a wide range of digests and flexible output, or md5deep for recursive and batch scanning across directories; choose the tool that fits the threat model and workflow. Where this leads md5sum is a simple, practical tool for integrity checks and scripting; once comfortable he can expand into secure hashing, automated verification pipelines, and system hardening, and consider formal study such as CompTIA Linux+ or LPIC-1 with intensive exam preparation at bitsandbytes.academy to deepen Linux skills. Join Bits & Bytes Academy First class LINUX exam preparation. utilities security backup scripting storage