Calculate md5, sha1 and sha256 Checksums of ISO Images

29/12/2020
Chưa phân loại
md5, sha1, and sha256 are different hashing algorithms. They take data in and gives you a fixed length hash of that data. The hashes are unique for different data sequence. Basically what that means is if you calculate the md5 or sha1 or sha256 hash of the same file, you will always get the same output.

This is used to verify whether a file is damaged/changed while downloading. If the contents of the file are unchanged, then the hash of the file would be the same as the original file. Changing even a single bit of the file would give you a different hash.

Ubuntu/Debian, CentOS and other Linux distributions tells you the md5 or sha1 or sha256 hashes of the original ISO file. So, once you download the ISO file from their official website or some geographically close mirrors, you can check whether the hashes are the same to verify that you got an exact copy of the original ISO file. If the hashes don’t match, then your ISO file is corrupted and you will have to download it again. Corrupted ISO files can cause lots of installation problems.

In this article, I will show you how to calculate md5, sha1, and sha256 hashes of the ISO image of your desired Linux distribution. So, let’s get started.

Finding md5, sha1, and sha256 Hashes of Linux ISO Images:

You can find the md5, sha1, and sha256 hashes in the official website of the Linux distribution that you’re downloading the ISO image from.

As you can see, the md5 and sha1 hashes are given in the downloads page of Arch Linux.

For Ubuntu, you can find the hashes at https://releases.ubuntu.com

Select the version of Ubuntu that you want to download and you should see a directory listing here. Each type of hashes has separate file. For example, the md5 hashes are stored in MD5SUMS file, the sha1 hashes are stored in SHA1SUMS file, and the sha256 hashes are stored in SHA256SUMS file.

If you click on the MD5SUMS file, the md5 hash for Ubuntu desktop and server ISO file should be displayed.

If you click on the SHA1SUMS file, the sha1 hash for Ubuntu desktop and server ISO file should be displayed the same way.

The same goes for sha256 hashes. The file to look at is SHA256SUMS.

Not all Linux distributions will list every type of hashes. Some will just use md5 and sha1 hashes. While others may use md5, sha1, and sha256 hashes.

Just like that, for other Linux distributions, you should find the md5, sha1 or sha256 hashes in their official websites. If you’re having a hard time, then just do a quick search on google. Remember to trust the hashes listed in the official websites only, not on any other random websites.

Now, you know how to find the md5, sha1 and sha256 checksums of the ISO images of your favorite Linux distributions.

Verifying md5, sha1 and sha256 Checksums of ISO Images:

In this section, I will show you how to calculate the md5, sha1, and sha256 hashes of the ISO images.

For example, let’s say you have downloaded the Ubuntu Server 18.04.1 LTS ISO image. Now, you want check whether the ISO image is corrupted or not.

First, navigate to the directory where you downloaded the ISO image as follows:

$ cd ~/Downloads

As you can see, the ISO image of Ubuntu Server 18.04.1 LTS is here.

Now, to calculate the md5 hash of the ISO file, run the following command:

$ md5sum ubuntu-18.04.1-live-server-amd64.iso

As you can see, the hash of the ISO file is printed on the console.

Now, put the original md5 hash and your calculated md5 hash side by side and compare them. As you can see, they are the same in my case.

If you want to calculate the sha1 hash of the ISO file, then run the following command:

$ sha1sum ubuntu-18.04.1-live-server-amd64.iso

As you can see, the sha1 hash is calculated and printed on the console.

As you can see, the hashes again matched with the original one.

The same way, you can calculate the sha256 hash of your ISO image as follows:

$ sha256sum ubuntu-18.04.1-live-server-amd64.iso

As you can see, the sha256 hash is calculated and the hash is printed on the console.

As you can see, the hashes matched again.

You don’t have to check for every type of hash to verify the integrity of your ISO image. Checking only one type is enough.

So, that’s how you calculate the md5, sha1 and sha256 hashes of ISO images of your desired Linux distributions. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to use Nslookup in Debian

Nslookup or name server lookup is a tool used by network administrators to find the hostname, IP address or other DNS records...
29/12/2020

[KVM][CentOS-7] Hướng dẫn cài đặt KVM trên CentOS-7

KVM (Kernel-based Virtual Machine) được biết đến là một cơ sở hạ tầng ảo hóa cho nhân Linux dành...
30/12/2020

Moodle [Part 1] – Triển khai hệ thống Moodle với Onet

Mục lục : Giới thiệu về Moodle – công cụ quản lý học tập trực tuyến hàng đầu Tính năng...
30/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024

Thuê mua IPv4 giá rẻ, tốc độ nhanh, uy tín #1
28/05/2024

Thuê địa chỉ IPv4 IPv6 trọn gói ở đâu chất lượng, giá RẺ nhất?
27/05/2024