Home >System Tutorial >LINUX >How To Verify Linux ISO Image Integrity And Authenticity
Verifying the integrity of downloaded ISO images is crucial for a secure Linux installation. This process ensures the downloaded file is an exact copy of the original, free from corruption or malicious alterations. This guide details how to verify ISO images in Linux, focusing on checksum verification and digital signature checks.
Table of Contents
sha256sum
sha256sum.txt
FileWhy Verify Linux ISO Images?
Verifying an ISO image serves two key purposes:
Verifying ISO Image Integrity
Download the ISO and Checksum: Download the ISO from the official website, along with its checksum file (e.g., .sha256
, .md5
).
Calculate the Checksum: Use sha256sum
(or md5sum
) to compute the hash of your downloaded ISO. For example:
sha256sum openSUSE-Leap-15.6-DVD-x86_64-Media.iso
Compare Checksums: Compare the calculated hash with the one in the checksum file. A match confirms the ISO's integrity.
Streamlined Checksum Comparison with sha256sum
Manually comparing checksums is prone to errors. The -c
option in sha256sum
automates this:
Download Files: Obtain the ISO and checksum file.
Verify with -c
:
sha256sum -c openSUSE-Leap-15.6-DVD-x86_64-Media.iso.sha256
An "OK" output indicates a successful verification. A "FAILED" message means the ISO is corrupted or tampered with. This method also works with sha256sum.txt
files provided by some distributions.
Authenticating the sha256sum.txt
File
A compromised sha256sum.txt
file could lead to accepting a malicious ISO. To verify its authenticity:
Import the Signing Key: Import the distribution's GPG key (e.g., for Linux Mint: gpg --keyserver hkp://keys.openpgp.org:80 --recv-key 27DEB15644C6B3CF3BD7D291300F846BA25BAE09
).
Verify the Signature: Use gpg
to verify the signature of sha256sum.txt.gpg
:
gpg --verify sha256sum.txt.gpg sha256sum.txt
A successful verification confirms the checksum file's authenticity.
Verifying ISOs with Linux Mint's Built-in Tools
Linux Mint offers a convenient graphical tool and a command-line utility:
mint-iso-verify linux-mint.iso
.Conclusion
Always verify ISO images before installation. Checksum and signature verification are essential steps for ensuring a secure and reliable Linux system. The methods outlined above provide a comprehensive approach to this critical security practice.
The above is the detailed content of How To Verify Linux ISO Image Integrity And Authenticity. For more information, please follow other related articles on the PHP Chinese website!