How to Install Ubuntu Desktop on Raspberry Pi 4

Brief: This thorough tutorial shows you how to install Ubuntu Desktop on Raspberry Pi 4 device.

The revolutionary Raspberry Pi is the most popular single board computer. It has its very own Debian based operating system called Raspbian.

There are several other operating systems available for Raspberry Pi but almost all of them are lightweight. This was appropriate for the small factor and low end hardware of the Pi devices.

This changes with the introduction of Raspberry Pi 4B that flaunts 8 GB RAM and supports 4K display. The aim is to use Raspberry Pi as a regular desktop and it succeeds in doing so to a larger extent.

Before the 4B model, you could install the Ubuntu server on Raspberry Pi but the desktop version was not available. However, Ubuntu now provides official desktop image for Pi 4 models.

In this tutorial, I am going to show the steps for installing Ubuntu desktop on Raspberry Pi 4.

First, a quick look at the prerequisites.

Prerequisites for running Ubuntu on Raspberry Pi 4

ubuntu desktop raspberry pi

Here’s what you need:

  1. A Linux or Windows system with active internet connection.
  2. Raspberry Pi Imager : The official open source tool from Raspberry that gets you the distro image on your SD card.
  3. Micro SD Card: Consider using at least a 16 GB storage for your card, albeit a 32 GB version is recommended.
  4. A USB based Micro SD Card Reader (if your computer does not have a card reader).
  5. Essential Raspberry Pi 4 accessories such as an HDMI compatible display, Micro HDMI to Standard HDMI (A/M) Cable, Power Supply (Official Adapter Recommended), USB Wired/Wireless Keyboard and Mouse/Touchpad.

It is good practice to read in detail about the Pi requirements beforehand.

Now, without further delay, let me quickly walk you through the image preparation for the SD Card.

Preparing the Ubuntu Desktop image for Raspberry Pi

Raspberry Pi provides a GUI application for writing the ISO image to the SD Card. This tool can also download compatible operating systems like Ubuntu, Raspbian etc automatically.

raspberry pi imager tool
Official tool to download and put operating system on SD card

You can download this tool for Ubuntu, Windows and macOS from the official website:

On Ubuntu and other Linux distributions, you can also install it with Snap:

sudo snap install rpi-imager

Once installed, run the imager tool. When you see the screen below, select “CHOOSE OS”:

pi imager choose os
Pi imager: choose the preferred operating system

Under “Operating System”, select “Other general purpose OS”:

pi imager other general purpose os
Pi imager: other general purpose operating systems

Now, select “Ubuntu”:

pi imager os ubuntu
Pi imager distro: Ubuntu

Next, select “Ubuntu Desktop 21.04 (RPI 4/400)” as shown below:

pi imager os ubuntu 21 04
Pi imager distro version: Ubuntu 21.04

Note

If you do not have a good, consistent internet collection, you can download the Ubuntu for Raspberry Pi image separately from Ubuntu’s website. In the Imager tool, while choosing the OS, go to the bottom and select “Use custom” option. You can also use Etcher for writing the image to the SD card.

Insert the micro SD card inside your Card reader and wait for it to mount. Select “CHOOSE STORAGE” under “Storage”:

pi imager choose storage
Pi imager – choose storage (SD card)

You should be seeing only your micro SD card storage and you’d recognize it instantly based on the size. Here, I’ve used a 32 GB card:

pi imager choose sd card
Pi imager – choose SD card

Now click on “WRITE”:

pi imager image write
Pi imager image write

I’ll assume you have the contents of the SD card backed up. If it’s a new card, you can just proceed:

pi imager image write confirm
Pi imager image write confirmation query

Since this is a sudo privilege, you must enter your password. If you run sudo rpi-imager from a terminal, this would not appear:

pi imager image write password
Pi imager image write authentication asking for password

If your SD card is a bit old, it would take some time. But if it is a recent one with high speeds, it wouldn’t take long:

pi imager writing image
Pi imager writing image

I also wouldn’t recommend skipping verification. Make sure the image write went successful:

pi imager verifying changes
Pi imager verifying changes

Once it is over, you will get the following confirmation:

pi imager write successful
Pi imager write successful

Now, safely-remove the SD card from your system.

Using the micro SD card with Ubuntu on Raspberry Pi

Half of the battle is won. Unlike the regular Ubuntu install, you have not created a live environment. Ubuntu is already installed on the SD card and is almost read to use. Let’s see what remains here.

Step 1: Insert the SD card into Pi

For first time users, it can take a bit confusing sometimes to figure out where on earth is that card slot! Not to worry. It is located below the board on the left-hand side. Here’s an inverted view with a card inserted:

pi inverted micro sd card inserted
Pi 4B board inverted and micro SD card inserted

Keep sliding the card in this orientation slowly into the slot below the board, gently until it no longer goes any further. This means it has just fit in perfectly. There won’t be any click sound.

raspberry pi sd slot left side middle below board
Raspberry Pi SD slot left side middle and below the pi board

You might notice two little pins adjusting themselves in the slot (shown above) as you put it inside, but that’s ok. Once inserted, the card would look like a bit protruded. That’s how it is supposed to look like:

pi sd card inserted
Pi SD card inserted with a little portion visible

Step 2: Setting Up the Raspberry Pi

I do not need to go in detail here, I presume.

Ensure that the power cable connector, micro HDMI cable connector, keyboard and mouse connectors (wired/non-wired) are securely connected to the Pi board in the relevant ports.

Make sure the display and power plug are properly connected as well, before you go ahead and turn on the power socket. I wouldn’t recommend plugging in the adapter to a live electrical socket. Look up electrical arcing.

Once you’ve ensured the above two steps, you can power on the Raspberry Pi device.

Step 3: The first run of Ubuntu desktop on Raspberry Pi

Once you power on the Raspberry Pi, you’ll be asked to some basic configuration on your first run. You just have to follow the onscreen instructions.

Select your language, keyboard layout, connect to WiFi etc.

You’ll be asked to select the time zone:

ubuntu raspberry pi first run 4
Select time zone

And then create the user and password:

ubuntu raspberry pi first run 5
Enter desired username and password

It will configure a couple of things and may take some time in doing so.

It may take some time after this, your system will reboot and you’ll find yourself at the Ubuntu login screen:

ubuntu raspberry pi login screen

You can start enjoying Ubuntu desktop on Raspberry Pi now.

ubuntu 21 04 post setup desktop
Ubuntu desktop on Raspberry Pi

Conclusion

I noticed a temporary anomaly: A red flickering border on the left-hand side of my display while doing the installation. This flickering (also of different colors) was noticeable on random parts of the screen as well. But it went away after restarting and the first boot.

It was much needed that Ubuntu to start providing support for popular ARM devices like Raspberry Pi and I am happy to see it running on a Raspberry Pi.

I hope you find this tutorial helpful. If you have questions or suggestions, please let me know in the comments.

About the author
Avimanyu Bandyopadhyay

Avimanyu Bandyopadhyay

Tech Nerd at It's FOSS | Doctoral Researcher on GPU-based Bioinformatics and author of <a href="https://www.packtpub.com/product/hands-on-gpu-computing-with-python/9781789341072">'Hands-On GPU Comput

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.