How to view the file hash value in Linux?

You can use the following command on Linux to view the hash value of a file:

  1. MD5 hash value:
  2. Generate the MD5 checksum for the file path.
  3. SHA1 hash value:
  4. Generate the SHA1 checksum for the file at the specified path.
  5. SHA256 hash value:
  6. Calculate the SHA256 checksum of a file.
  7. SHA512 hash value:
  8. Calculate the SHA-512 checksum of a file.

For example, to view the MD5 hash value of the file /path/to/file.txt, you can run the following command:

md5sum /path/to/file.txt

Please note that the hash value outputted above is represented in hexadecimal format.

bannerAds