#!/bin/bash # download-ubuntu-server.sh - Downloads and verifies latest Ubuntu Server LTS RELEASE="24.04.2" # Update as needed ARCH="amd64" ISO="ubuntu-$RELEASE-live-server-$ARCH.iso" BASE_URL="https://releases.ubuntu.com/$RELEASE"
echo "Downloading checksums and signature..." wget -c "$BASE_URL/SHA256SUMS" wget -c "$BASE_URL/SHA256SUMS.gpg" download ubuntu server iso
wget -c https://releases.ubuntu.com/24.04.2/ubuntu-24.04.2-live-server-amd64.iso For large-scale deployments or to reduce load on Canonical's servers, you can use BitTorrent. The torrent files are available alongside the ISOs on releases.ubuntu.com . Look for files ending in .torrent . or Deluge. If wget is unavailable:
echo "Verifying GPG signature (requires gpg)..." gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0x843938DF228D22F7B3742BC0D94AA3F0EFE21092 gpg --verify SHA256SUMS.gpg SHA256SUMS if [ $? -ne 0 ]; then echo "GPG verification failed!" exit 1 fi download ubuntu server iso
Simply open the torrent file with a client like Transmission, qBittorrent, or Deluge. If wget is unavailable: