Distros : Prep - wget

Wget is an easy to use command line tool for downloading files, its a better option than using a web browser.

At the Download Page of a Linux Distro, below is one of Debian's Network Install pages, there will be the installation image, that's the .ISO file.

There should also be a method of verifying this image in the form of a checksum file, the SHA256SUMS and SHA512SUMS files and signature files the .sign files, more of them later, for now as they are small text files simply Right Click and Save As placing them into your Download Folder

Saving Link as and Copying to my Download Folder

Ideally Click on Create Folder and name it after the Linux Distro, (this could be the first of many Distro that you try out). I created a folder - Debian11 and saved the files there.

Creating a Folder to keep my Download Folder tidy.

Now to download the much larger .iso file. Open a Terminal and change directory cd to where you have downloaded the files and do an ls to see them.

$ cd Downloads/Debian11/
Dow then Tab then D then Tab
$ pwd
/home/bryan/Downloads/Debian11
$ ls
SHA512SUMS.sign  SHA512SUMS

Back at the download page Right Click the link for the .iso file and this time choose to Copy Link Location instead of Save Link as.

Copying Link Location so that I can use wget to download the iso instead of the web browser.

Returning to the terminal type in wget and space then Right Click and choose Paste or better still just do a Ctrl+Shift+V to give wget the link for the ISO and hit Enter.

Click and Paste the link better still Ctrl+Shift+V.
$ wget https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-
firmware/current/multi-arch/iso-cd/firmware-11.0.0-amd64-i386-netinst.iso

wget will do some Resolving and Connect to a server making a HTTP request and then start to download fhe file.

wget downloading a file.

Wget has many download options the most important option is -c or --continue if you like typing, to resume a partially downloaded file. To try it out I stopped wget with Ctrl+C.

$ wget --help
.......
Download:
  -t,  --tries=NUMBER              set number of retries to NUMBER (0 unlimits)
       --retry-connrefused         retry even if connection is refused
       --retry-on-http-error=ERRORS    comma-separated list of HTTP errors to retry
  -O,  --output-document=FILE      write documents to FILE
  -nc, --no-clobber                skip downloads that would download to
                                     existing files (overwriting them)
       --no-netrc                  don't try to obtain credentials from .netrc
  -c,  --continue                  resume getting a partially-downloaded file
       --start-pos=OFFSET          start downloading from zero-based position OFFSET
       --progress=TYPE             select progress gauge type
       --show-progress             display the progress bar in any verbosity mode
  -N,  --timestamping              don't re-retrieve files unless newer than
                                     local
.....

I then hit the Up arrow key to go back to the wget command, hit the End key to get to the end of that command, added a space then added the -c option and hit Enter to continue the download.

Wget resuming a download

The +++ signs indicates the amount of file previously downloaded and the ===> indicates the latest progress.

I did Ctrl+C a few more times and then the -c option to resume, and when the file downloaded I proved it was perfect by running the command sha512sum -c SHA512SUMS.

$ ls
firmware-11.0.0-amd64-i386-netinst.iso  SHA256SUMS.sign  SHA512SUMS
$ sha512sum -c SHA512SUMS
This command took over a minute to complete!!
firmware-11.0.0-amd64-i386-netinst.iso: OK

More about checksums »

Now to prove that the Checksum file was created by Debian and so proving that they created the .iso file: I have gpg set up on my pc so I simply issued the command below..

$ gpg --verify SHA512SUMS.sign SHA512SUMS
gpg: Signature made Sat 14 Aug 2021 21:26:26 BST
gpg: using RSA key DF9B9C49EAA9298432589D76DA87E80D6294BE9B
gpg: Good signature from Debian CD signing key 
     debian-cd@lists.debian.org [full]

More about gpg »

While still in the Debian11 directory I could go old school and use dd to burn the ISO onto a USB Key or play it safe, go back to the Desktop and use Etcher instead.