sha1sum is a computer program that calculates and verifies SHA-1 hashes. It is commonly used to verify the integrity of files. It (or a variant) is installed by default in most Unix-like operating systems. Variants include shasum (which permits SHA-1 through SHA-512 hash functions to be selected manually) and sha224sum, sha256sum, sha384sum and sha512sum, which use a specific SHA-2 hash function. Versions for Microsoft Windows also exist. On FreeBSD this utility is called 'sha512' and contains additional features.
Several source code management systems, including Git, Mercurial, Monotone, and Fossil, use the sha1sum of various types of content (file content, directory trees, ancestry information, etc.) to uniquely identify them.
To create a file with an sha1 hash in it, if one isn't provided execute:
sha1sum filename [filename] ... > SHA1SUM
if you are distributing one file you can append ".sha1" to the filename e.g.:
sha1sum my-zip.tar.gz > my-zip.tar.gz.sha1
To verify the file was downloaded correctly you can execute:
sha1sum -c SHA1SUM # filename: OK # filename...: OK
sha1sum -c my-zip.tar.gz.sha1 # my-zip.tar.gz: OK
 See also
- The program's man page
- Apple Knowledge Base Article "Mac OS X: How to Verify a SHA-1 Digest"
- sha1sum for Windows announcement
- Linux Windows Install Configuration Project
|This security software article is a stub. You can help Wikipedia by expanding it.|