How to check the integrity of downloaded files on Linux system

  

Because Linux installation software is more complicated, if the downloaded software is modified, it will be very troublesome to install. It is very important to check the integrity of the downloaded files on Linux system. The following small series will introduce you how to check the integrity of the downloaded files in the Linux system.

this check method generally MD5, SHA1, PGP three. In the long years of Windows (the vicissitudes of wood), you can only access the first two —— if you will check it.

MD5 checksum

Principle: MD5 Hash on the file, find the MD5 hash value of the file, and download the MD5 hash value of the file and the MD5 hash value provided by the publisher. Consistently to determine whether the file has been tampered with after the publisher posted it.

Description: A Hash algorithm with a long life span, a wide range of applications, website storage passwords are often used. The MD5 hash value generated by different files is unique, but there is a way to make the hash value of the file after MD5 consistent by making minor modifications to the file.

Use: Under CentOS, it is very simple to make MD5 Hash for files. One md5sum command can be:

The code is as follows:

# $ is the terminal prompt , not input.

# #号是笔记

# No prompt is output

#Direct output MD5 Hash

$ md5sum your-downloaded-file-name

fd4a1b802373c57c10c926eb7ac823d8 your-downloaded-file-name "/p" "p"# Save the MD5 hash value to the md5-hash.txt file.

$ md5sum your-downloaded-file-name 》 md5-hash.txt

# Display the output of md5-hast.txt

$ cat md5-hash.txt

fd4a1b802373c57c10c926eb7ac823d8 your-downloaded-file-name "/p" "p"# Verify that the file you downloaded is correct by md5-hash.txt

$ md5sum -c md5-hash .txt

your-downloaded-file-name: OK

You are the publisher of the file, you can send the hash of the file to the verifier via md5sum, so that you can download the file. People can verify the correctness of your files with MD5 hashes. Conversely, after downloading the file on the website, we can also obtain the publisher's MD5 hash value and the locally generated hash value. If they are consistent, the file is considered correct.
Previous123Next page Total 3 pages

Copyright © Windows knowledge All Rights Reserved