Downloading and verifying installation media
On this page
The download finished after twenty minutes. You have a file of about 6 GB, named ubuntu-24.04.5.1-desktop-amd64.iso. The name is right and the size looks right.
But the name and the size say nothing about the bytes inside. A connection can break and corrupt part of the file. A website that copies Ubuntu’s files can serve a version that someone changed. A changed installer would still start, still install, and still look like Ubuntu.
By the end of this lesson, you can choose the right Ubuntu image for your computer, prove that your copy is exactly the file Ubuntu published, and explain what that proof does not cover.
Before you start
Section titled “Before you start”- VM, WSL, live media, and bare metal (B02.1), which explains why this course uses Ubuntu 24.04 LTS in a VM.
- A computer with an internet connection and about 7 GB of free space.
- You have no Linux system yet, so you run the real checks on your own computer. The Linux examples use the course’s lab system and small practice files, so you see each step first.
Find the 24.04 download
Section titled “Find the 24.04 download”Ubuntu’s main page, ubuntu.com/download/desktop, offers the newest Ubuntu releases, which are not 24.04. This course is tested on 24.04, so download from the 24.04 release folders instead. The next section shows which one fits your processor:
- Intel or AMD processor (amd64): releases.ubuntu.com/24.04
- ARM processor (arm64): cdimage.ubuntu.com/releases/24.04/release
The part after 24.04 in a file name is the point release: an update of 24.04 with the fixes released since. A folder can hold images of several point releases, and Ubuntu adds new ones, so take the desktop image with the highest number. When this lesson was checked, that was ubuntu-24.04.5.1-desktop-amd64.iso for amd64 and ubuntu-24.04.5-desktop-arm64.iso for arm64; the examples below use these names.
Each folder also has two small files at the top of the list. Download both into the same folder as the image, usually your Downloads folder:
SHA256SUMS, a text file with one line for each image in the folder.SHA256SUMS.gpg, a signature forSHA256SUMS. Its purpose comes later in this lesson.
Choose amd64 or arm64
Section titled “Choose amd64 or arm64”An image is built for one family of processors, an architecture. Ubuntu’s download page names two for desktops: “Intel or AMD 64-bit architecture”, called amd64, and “ARM 64-bit architecture”, called arm64. The name amd64 also covers Intel processors.
Pick the image that matches your computer’s processor. To find it:
- Windows 11: open Settings, System, About. Under System type, “x64-based processor” means amd64, and “ARM-based processor” means arm64.
- macOS: open the Apple menu and choose About This Mac. An item labeled Chip, with the name of an Apple chip, means arm64. An item labeled Processor, with the name of an Intel processor, means amd64.
- Ubuntu or Debian: run
dpkg --print-architecturein a terminal. It printsamd64orarm64.
On the lab system, which runs on an Intel processor, the command prints:
dpkg --print-architectureamd64Meet the practice files
Section titled “Meet the practice files”The lab system cannot hold a 6 GB image, so the Linux examples use three small practice files. None is a real Ubuntu image:
practice-desktop.isostands in for the image you downloaded. It is a 113-byte text file.SHA256SUMSis a listing in the same format as Ubuntu’s.altered/practice-desktop.isois a copy with the same name and one character changed.
Check the file against the published value
Section titled “Check the file against the published value”In the replay, cat prints the listing, and sha256sum prints the practice image’s checksum. The prompt learner@rootvolt:~/lab$ belongs to the lab system; you build your own ~/lab in lesson B04.1.
learner@rootvolt:~/lab$ cat SHA256SUMSa7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f *practice-desktop.iso
07419434e8a5be2f0731442851ce5fb8e69779461f76e7340a2808dc02e6282e *practice-server.isolearner@rootvolt:~/lab$ sha256sum practice-desktop.isoa7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f practice-desktop.isolearner@rootvolt:~/lab$ sha256sum -c --ignore-missing SHA256SUMSpractice-desktop.iso: OKlearner@rootvolt:~/lab$ Files ~/lab
- ~
- lab/cwd
- altered/
- practice-desktop.iso-rw-r--r--
- practice-desktop.iso-rw-r--r--
- SHA256SUMSargument-rw-r--r--
Steps (10)
- Type
cat SHA256SUMS— Print the published listing - Press Enter
- Output:
a7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f *practice-desktop.iso 07419434e8a5be2f0731442851ce5fb8e69779461f76e7340a2808dc02e6282e *practice-server.iso - Type
sha256sum practice-desktop.iso— Compute the checksum of the downloaded file - Press Enter
- Output:
a7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f practice-desktop.iso - Type
sha256sum -c --ignore-missing SHA256SUMS— Let sha256sum compare every character - Press Enter
- Output:
practice-desktop.iso: OK - The computed checksum equals the published one, so the file arrived unchanged.
In words: cat SHA256SUMS prints two lines. Each line is a long code, a space, a *, and a file name. sha256sum practice-desktop.iso prints the same code that the listing gives for practice-desktop.iso. Then sha256sum -c --ignore-missing SHA256SUMS prints practice-desktop.iso: OK.
The long code is the file’s SHA-256 checksum. SHA-256 is a method that reads every byte of a file and turns them into a number of 256 bits, written as 64 characters from 0 to 9 and a to f. The same bytes always give the same checksum. Windows calls the checksum a hash; both words mean the same here.
Like Ubuntu’s listing, it also names a file you did not download, practice-server.iso. The * before each name marks how the file is read; the sha256sum manual notes that it makes no difference on GNU systems such as Ubuntu.
sha256sum -c reads the listing, computes the checksum of each file it names, and compares all 64 characters for you. --ignore-missing tells it to skip files that are not there.
One changed character
Section titled “One changed character”The altered copy differs from the practice image in one character: not became now. Guess first: how much of its checksum changes? One character, a few, or most of them?
sha256sum practice-desktop.iso altered/practice-desktop.isoRun it, then compare with your guess
a7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f practice-desktop.isobacb2f2472c5942659af01fadd138117072d5e9079af2d43098a52dcfb404ec3 altered/practice-desktop.isoAlmost every character is different. SHA-256 is designed this way: any change, even one bit, gives a checksum that looks unrelated.
learner@rootvolt:~/lab$ cat practice-desktop.iso altered/practice-desktop.isoRootVolt practice image
This small text file stands in for an installation image.
It is not an operating system.
RootVolt practice image
This small text file stands in for an installation image.
It is now an operating system.learner@rootvolt:~/lab$ sha256sum practice-desktop.iso altered/practice-desktop.isoa7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f practice-desktop.iso
bacb2f2472c5942659af01fadd138117072d5e9079af2d43098a52dcfb404ec3 altered/practice-desktop.isolearner@rootvolt:~/lab$ Files ~/lab
- ~
- lab/cwd
- altered/
- practice-desktop.iso-rw-r--r--
- practice-desktop.iso-rw-r--r--
- SHA256SUMS-rw-r--r--
Steps (7)
- Type
cat practice-desktop.iso altered/practice-desktop.iso— Print both files: one character differs - Press Enter
- Output:
RootVolt practice image This small text file stands in for an installation image. It is not an operating system. RootVolt practice image This small text file stands in for an installation image. It is now an operating system. - Type
sha256sum practice-desktop.iso altered/practice-desktop.iso— Compute both checksums - Press Enter
- Output:
a7ec2c73dc8f5c824a27a3931f35bd0695837105838e51f843550c08ad3f8a6f practice-desktop.iso bacb2f2472c5942659af01fadd138117072d5e9079af2d43098a52dcfb404ec3 altered/practice-desktop.iso - One changed character gives a completely different checksum. It does not match SHA256SUMS, so the altered copy is rejected.
In words: cat prints both files, which differ only in not and now, and sha256sum prints two checksums that do not match. You reject the altered copy: delete it and download again.
sha256sum -c gives the same verdict. Run it from inside the altered folder: cd altered moves there (module B05 teaches cd), and ../SHA256SUMS names the listing in the folder above:
cd alteredsha256sum -c --ignore-missing ../SHA256SUMSpractice-desktop.iso: FAILEDsha256sum: WARNING: 1 computed checksum did NOT matchsha256sum: ../SHA256SUMS: no file was verifiedFAILED and did NOT match mean the file is not the one the listing describes.
Always compare the complete checksum. Checking only the first and last few characters is not enough: someone who makes many altered versions of a file can find one whose checksum starts and ends with the same few characters. Finding one that matches all 64 is not practical.
Check the real image on your computer
Section titled “Check the real image on your computer”Now do the same with your real download, on your own computer. Open a terminal and change to the folder with the image. The commands below use the file names from the first section; type the name of the file you downloaded.
Open Windows PowerShell from the Start menu. It starts in your user folder.
cd DownloadsGet-FileHash .\ubuntu-24.04.5.1-desktop-amd64.iso | Format-ListGet-FileHash uses SHA-256 unless you ask for another method, and Format-List keeps the long checksum from being cut off. Windows prints capital letters and SHA256SUMS small ones; case does not matter here.
Open Terminal (Applications, Utilities).
cd Downloadsshasum -a 256 ubuntu-24.04.5-desktop-arm64.iso-a 256 selects SHA-256; without it, shasum uses an older method that will not match. If macOS asks whether Terminal may open your Downloads folder, allow it.
Open a terminal.
cd ~/Downloadssha256sum -c --ignore-missing SHA256SUMSThe line for your image must end with OK. To see the checksum itself, run sha256sum with the image name.
Computing the checksum of 6 GB takes a while; wait for the prompt to return. On Windows and macOS, open SHA256SUMS in Notepad or TextEdit, find the line that ends with your exact file name, and compare all 64 characters.
Integrity is not authenticity
Section titled “Integrity is not authenticity”A matching checksum proves integrity: your file is exactly the file that SHA256SUMS describes.
It does not prove authenticity: that SHA256SUMS itself came from Ubuntu. Someone who can replace the image on the website can also replace the listing next to it, with the checksum of their own image, and your check would pass.
SHA256SUMS.gpg closes that gap. It is a digital signature: a value that Ubuntu computes from SHA256SUMS with a secret private key that only Ubuntu holds. Anyone can check the signature with Ubuntu’s matching public key. If even one character of SHA256SUMS changes, the check fails, and nobody without the private key can make a new signature that passes.
| Check | Proves | Does not prove |
|---|---|---|
| Checksum of the image | The image matches its line in SHA256SUMS |
That the listing came from Ubuntu |
Signature of SHA256SUMS |
Ubuntu’s key signed the listing, and it was not changed | Anything about the image by itself |
Together, they form a chain: Ubuntu’s key vouches for the listing, and the listing vouches for the image.
Check the signature
Section titled “Check the signature”The signature check needs the program gpg. Ubuntu includes it; on macOS, Ubuntu’s tutorial installs it with Homebrew. For Windows, the tutorial suggests Bash on Windows, which is WSL, but do not install WSL for this: lesson B02.1 explains that WSL 2 and VirtualBox are not a supported combination. Use Gpg4win, the Windows version of GnuPG named on GnuPG’s download page, and run the same commands in PowerShell. Without the signature, the checksum still proves integrity.
In the folder with both files, Ubuntu’s tutorial uses:
gpg --keyid-format long --verify SHA256SUMS.gpg SHA256SUMSThe first time, gpg reports Can't check signature: No public key, because it does not have Ubuntu’s public key yet. The tutorial downloads it from Ubuntu’s key server:
gpg --keyid-format long --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x46181433FBB75451 0xD94AA3F0EFE21092Run the --verify command again. Look for Good signature from "Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>". A BAD signature means the listing was changed: do not use it.
You will also see a warning that the key “is not certified with a trusted signature”. It means gpg cannot tell on its own that the key belongs to Ubuntu. You check that yourself: compare the key’s fingerprint, which gpg prints, with the one in Ubuntu’s tutorial, 8439 38DF 228D 22F7 B374 2BC0 D94A A3F0 EFE2 1092.
Mistakes to recognize
Section titled “Mistakes to recognize”Errors for images you did not download. Without --ignore-missing, sha256sum -c also tries every other file in the listing:
sha256sum -c SHA256SUMSpractice-desktop.iso: OKsha256sum: practice-server.iso: No such file or directorypractice-server.iso: FAILED open or readsha256sum: WARNING: 1 listed file could not be readFAILED open or read means the file was not found, not that it is damaged. Only the line with your file name matters, and it says OK. A changed file gives FAILED without open or read, as the altered copy showed.
Checking the image instead of the listing. -c expects the listing, not the image:
sha256sum -c practice-desktop.isosha256sum: practice-desktop.iso: no properly formatted checksum lines foundsha256sum read the image and found no lines in the form “checksum, space, file name”. Give -c the file SHA256SUMS.
Comparing with the wrong line. SHA256SUMS lists several images whose names differ by a few characters: the point release, desktop or live-server, and the architecture. Before you decide that a download is damaged, check that you used the line with your exact file name.
Security Angle
Section titled “Security Angle”A changed installer can add a hidden program to every system it installs, so attackers who control a download site, or a site that only looks official, have a reason to serve one. A checksum from a forum post, a video, or a course page, including this one, is only as trustworthy as whoever published it. That is why this lesson shows no checksum for the real image. The signature does not depend on where you got the files: Ubuntu’s tutorial says a matching signature means the listing is authentic, even from a mirror you do not trust.
Try it yourself
Section titled “Try it yourself”Goal: Verify the Ubuntu image you will install in the next lesson.
- Find your computer’s architecture.
- Download the 24.04 desktop image for it, plus
SHA256SUMSandSHA256SUMS.gpg, from the same folder. - Compute the image’s SHA-256 checksum on your computer and compare it with its line in
SHA256SUMS. - If
gpgis available to you, check the signature and the key fingerprint.
Expected: All 64 characters match. If you checked the signature, gpg reports a good signature from the Ubuntu CD Image Automatic Signing Key (2012), with the fingerprint from the tutorial.
Hint
The commands for each system are in “Check the real image on your computer”. If the checksums differ, check first that you are reading the line with your exact file name.
Solution
- Windows: Settings, System, About, System type. macOS: About This Mac, Chip or Processor. Ubuntu:
dpkg --print-architecture. - amd64: releases.ubuntu.com/24.04. arm64: cdimage.ubuntu.com/releases/24.04/release.
- The commands in “Check the real image on your computer”:
Get-FileHashon Windows,shasum -a 256on macOS,sha256sum -c --ignore-missing SHA256SUMSon Linux. - The commands in “Check the signature”, with Gpg4win on Windows.
If the checksums differ, do not use the file. Delete it, download it again from the Ubuntu folder, and check again.
- Download 24.04 from Ubuntu’s release folders: amd64 for Intel or AMD processors, arm64 for ARM.
- A SHA-256 checksum is 64 characters computed from every byte of a file. One changed character gives a different checksum.
- Compare the complete checksum with the line for your exact file name in
SHA256SUMS, by eye or withsha256sum -c --ignore-missing SHA256SUMS. - A matching checksum proves integrity. The signature in
SHA256SUMS.gpg, checked against Ubuntu’s key fingerprint, adds authenticity: the listing came from Ubuntu.
Next, in Creating and installing the VM (B02.3), you create the virtual machine and install Ubuntu from the image you verified.
Further reading
Section titled “Further reading”All sources were checked on 1 November 2026, except the GnuPG download page, added on 2 November 2026.
- Ubuntu tutorials: How to verify your Ubuntu download, the source for the
gpgcommands, the key names, and the fingerprint. - Ubuntu downloads: Download Ubuntu Desktop, with the architecture names; the 24.04 release folders releases.ubuntu.com/24.04 (amd64) and cdimage.ubuntu.com/releases/24.04/release (arm64 and other architectures).
man sha256sumon Ubuntu, or the Ubuntu 24.04 sha256sum(1) page, for-c,--ignore-missing, and the*marker.- Microsoft Learn: Get-FileHash, and Find information about your Windows device.
- GnuPG: Download, which names Gpg4win as the Windows version of GnuPG.
- Apple Support: Mac computers with Apple silicon. On a Mac,
man shasumdescribes-a 256.