Family Encyclopedia >> Electronics

How to Install Ubuntu on Raspberry Pi: A Complete Step-by-Step Guide

As a seasoned Raspberry Pi user and Linux enthusiast with years of hands-on experience deploying Ubuntu on single-board computers, I can confirm that while Raspberry Pi supports many Linux distributions via simple SD card flashing, Ubuntu requires a slightly different approach. Previously, this involved creating an Ubuntu SSO account to download Ubuntu Core images—a real hassle. Thankfully, the official Raspberry Pi Imager tool has simplified everything.

In this guide, I'll walk you through flashing Ubuntu onto your Raspberry Pi effortlessly, configuring Wi-Fi for automatic connection, and setting up a desktop environment or headless access. Let's get started.

Introducing the Raspberry Pi Imager

Released by the Raspberry Pi Foundation in March 2020, the Raspberry Pi Imager is a user-friendly tool that fetches a curated list of compatible operating systems directly from their servers. Select your OS, insert an SD card, and it handles downloading and writing the image—no manual hunting for files required. It's reliable, secure, and perfect for Ubuntu installs.

Install Ubuntu Using Raspberry Pi Imager

Download the latest Raspberry Pi Imager from the official Raspberry Pi Foundation website, choosing the version for your OS (Windows, macOS, or Linux).

Once installed:

  1. Insert a microSD card (at least 8GB recommended) into your computer.
  2. Launch the Raspberry Pi Imager.
  3. Click "Choose OS." It will load compatible systems.
  4. Select "Other specific-purpose OS" > "Ubuntu" > the latest Ubuntu Server (64-bit for Pi 3/4/400, or Desktop if available).
  5. Click "Choose Storage" and select your SD card.
  6. Click "Write" and confirm. Wait for the process to complete with verification.
How to Install Ubuntu on Raspberry Pi: A Complete Step-by-Step Guide

Your SD card now has Ubuntu ready to boot.

Configure Ubuntu for Automatic Wi-Fi Connection

To enable headless Wi-Fi setup:

  1. With the SD card still inserted, open your file manager and access the "system-boot" partition.
  2. Open "network-config" in a text editor (e.g., Notepad++ or nano).
  3. How to Install Ubuntu on Raspberry Pi: A Complete Step-by-Step Guide

Locate the "wifis" section. Uncomment lines by removing the leading "#" symbols:

How to Install Ubuntu on Raspberry Pi: A Complete Step-by-Step Guide
wifis:
  wlan0:
    dhcp4: true
    optional: true
    access-points:
      "myhomewifi":
        password: "S3kr1t"

Replace "myhomewifi" with your SSID (quote if spaces: "My Home WiFi"). Update "S3kr1t" to your password. Save and eject the SD card safely.

Boot your Pi—it will connect automatically.

Getting Started with Ubuntu on Raspberry Pi

Connect a monitor, keyboard, and power. At login: username ubuntu, password ubuntu. Change the password promptly as prompted for security.

Optional: Install a Desktop Environment

Ubuntu boots to CLI by default. For a GUI:

sudo apt update && sudo apt upgrade -y

Install a lightweight desktop (e.g., Lubuntu for Pi performance):

sudo apt install lubuntu-desktop

Or alternatives:

sudo apt install kubuntu-desktop
sudo apt install xubuntu-desktop

Reboot:

sudo reboot

Your desktop will load on next boot.

Set Up Headless Access via SSH

For headless use, enable SSH and find your Pi's IP:

  • Log into your router's admin page (e.g., 192.168.1.1) and check connected devices for the Pi's IP.
  • Use Fing app (Android/iOS): Scan network, locate Raspberry Pi.
How to Install Ubuntu on Raspberry Pi: A Complete Step-by-Step Guide

Connect via SSH

Open a terminal:

ssh ubuntu@<Pi-IP-address>

Password: ubuntu. You're in—run commands remotely.

Conclusion

Installing Ubuntu on Raspberry Pi is now straightforward with the Imager. For alternatives, try Raspberry Pi OS, FydeOS, or use your Pi as a Wi-Fi bridge. Questions? Test it yourself and explore Ubuntu's power on ARM hardware.