Welcome aboard!
Always exploring, always improving.

Ubuntu Server 24.04 Installation: Comprehensive Step-by-Step LTS Guide

Ubuntu Server 24.04 LTS brings five years of support, performance boosts in Linux 6.8, and built-in container tools. This guide walks you through every command and menu click—from preparing your USB stick to locking down SSH—so you can deploy a production-ready server with confidence.

1. System Requirements & Preparations

  • CPU: 2 cores @ 2 GHz minimum
  • RAM: 4 GB (8 GB+ recommended)
  • Disk: ≥ 25 GB (SSD preferred)
  • Network: Wired Ethernet adapter
  • Boot Media: USB stick (8 GB+)
  • Secondary Machine: To download ISO and write USB

Tip: Enable virtualization (VT-x/AMD-V) in BIOS if you plan VMs.

2. Download & Validate the ISO

  1. Download
    wget https://releases.ubuntu.com/24.04/ubuntu-24.04-live-server-amd64.iso
  2. Verify Checksum
    sha256sum ubuntu-24.04-live-server-amd64.iso

    Compare against the checksum on releases.ubuntu.com/24.04.

3. Create a Bootable USB

On Linux/macOS

sudo dd if=ubuntu-24.04-live-server-amd64.iso of=/dev/sdX bs=4M status=progress && sync

> Replace /dev/sdX with your USB device (check with lsblk).

On Windows

  1. Download Rufus.
  2. Select your USB drive & ISO.
  3. Click Start.

4. Boot & Begin Installer

  1. Insert USB into target machine.
  2. Reboot and press F2/F12 (or your vendor key) to select USB boot.
  3. Choose Install Ubuntu Server at the initial menu.

5. Language, Keyboard & Network

  1. Language: English (US)
  2. Keyboard: US (or your locale)
  3. Network:
    • DHCP: Automatic IP assignment.
    • Static: Skip for now; configure later via Netplan.

6. Disk Partitioning

You have two main options:

Automatic (Recommended)

  • Use entire disk – installer creates GPT, root, swap automatically.

Manual (Advanced)

  1. Create GPT partition table.
  2. EFI System Partition (512 MB, FAT32, mount at /boot/efi).
  3. Root (/) (20 GB+, ext4).
  4. Home (/home) (optional, ext4).
  5. Swap File (recommended over partition; we’ll add a 4 GB swap file post-install).

7. User Account & SSH

  1. Your name: Admin (for prompt)
  2. Server name: ubuntu24-server
  3. Username: ubuntuuser
  4. Password: strong, unique
  5. Install OpenSSH server: ✔️

> SSH Key Setup (on client machine):

ssh-keygen -t ed25519 -C "ubuntuuser@$(hostname)"
ssh-copy-id [email protected]

8. Finalize Installation

  1. Review changes and Confirm to write to disk.
  2. Wait for packages to finish.
  3. When prompted, remove the USB stick and reboot.

9. First-Boot & System Update

ssh [email protected]
sudo apt update && sudo apt full-upgrade -y
sudo reboot

10. Configure Swap File

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

11. Static IP via Netplan

  1. Identify interface: ip link
  2. Edit /etc/netplan/01-netcfg.yaml:
    network:
      version: 2
      ethernets:
        ens3:
          dhcp4: no
          addresses: [192.168.1.100/24]
          gateway4: 192.168.1.1
          nameservers:
            addresses: [8.8.8.8, 1.1.1.1]
  3. Apply:
    sudo netplan apply
    ip addr show ens3

12. Basic Security Hardening

  1. Change SSH Port:Edit /etc/ssh/sshd_config, set Port 2222, then sudo systemctl restart sshd.
  2. Disable Root Login:In sshd_config, set PermitRootLogin no.
  3. Enable UFW Firewall:
    sudo ufw allow 2222/tcp
    sudo ufw allow http
    sudo ufw allow https
    sudo ufw enable
    sudo ufw status
  4. Install Fail2Ban:
    sudo apt install fail2ban -y
    sudo systemctl enable fail2ban

13. Time Synchronization

sudo timedatectl set-timezone America/Los_Angeles
sudo apt install chrony -y
sudo systemctl enable chrony

14. Verify & Enjoy

  • Reboot one more time: sudo reboot.
  • Check services:
    systemctl status ssh chrony fail2ban
    ufw status verbose

Your Ubuntu Server 24.04 LTS is now fully installed, updated, and secured—ready for web services, databases, containers, or any production workload.

Like(1) Support the Author
Reproduction without permission is prohibited.FoxDoo Technology » Ubuntu Server 24.04 Installation: Comprehensive Step-by-Step LTS Guide

If you find this article helpful, please support the author.

Sign In

Forgot Password

Sign Up