Checksums are (hopefully) uniquely generated strings derived from applying a hash function to all of the data in a particular file. Common hash algorithms include MD5, SHA1, SHA256, and SHA512. A typical use case of a checksum is in the verification of downloaded files. A person hosting a file on the internet will often provide the checksum string for which a user can cross check with their own copy of the file. This is used to verify that the data has not been tampered with and that no data corruption has occurred during the transfer.
Linux makes it very simple and straightforward to generate hashes. The syntax is as follows:
$ <algorithm>sum <file>
Examples:
Print to tty session
$ md5sum .bashrc 44478f3f5928690793b8882d0cb310cf *.bashrc
Print to file
$ sha256sum .bashrc > .bashrc.sha256
Windows, as always, is some horribly unmemorable syntax.
C:\> certutil -hashfile <file> <algorithm>
Example
C:\> certutil -hashfile .\mpv-shot0001.jpg SHA256 SHA256 hash of .\mpv-shot0001.jpg: f70965aeb05a85a464471ac000676262701dc88d7dce969e2a1997ef7f72ee2e CertUtil: -hashfile command completed successfully.
$ sha256sum -c <file>.sha256 < <file>
Example
$ sha256sum -c test.txt.sha256 < test.txt test.txt: OK
Use your eyes to read each character to verify that the two hashes are the same, or use cygwin.