Skip to content

How to calculate md5, sha1, sha256, sha512 checksum in Linux

homepage-banner

Introduction

Checksums are used to verify the integrity of downloaded, transferred, or stored files. They ensure that the file has not been corrupted or tampered with in any way. Linux provides several tools to calculate the checksum values of files, including md5, sha1, sha256, and sha512. In this blog post, we will discuss how to calculate these checksum values in Linux.

md5

md5sum filename

sha

### sha1
shasum filename
### sha256
shasum -a 256 filename
### sha512
shasum -a 512 filename

Conclusion

Calculating checksum values of files is an important step in ensuring the integrity and security of data. In Linux, md5, sha1, sha256, and sha512 checksum values can be easily calculated using built-in tools like md5sum, sha1sum, sha256sum, and sha512sum. By verifying the checksum values of files, you can be sure that they have not been corrupted or tampered with.

Feedback







Disclaimer
  • Welcome to visit the knowledge base of SRE and DevOps!
  • License under CC BY-NC 4.0
  • Made with Material for MkDocs and improve writing by generative AI tools
  • Copyright issue feedback me#imzye.com, replace # with @