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
Here’s what you need:
- A Linux or Windows system with active internet connection.
- Raspberry Pi Imager : The official open source tool from Raspberry that gets you the distro image on your SD card.
- Micro SD Card: Consider using at least a 16 GB storage for your card, albeit a 32 GB version is recommended.
- A USB based Micro SD Card Reader (if your computer does not have a card reader).
- 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.
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”:
Under “Operating System”, select “Other general purpose OS”:
Now, select “Ubuntu”:
Next, select “Ubuntu Desktop 21.04 (RPI 4/400)” as shown below:
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”:
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:
Now click on “WRITE”:
I’ll assume you have the contents of the SD card backed up. If it’s a new card, you can just proceed:
Since this is a sudo privilege, you must enter your password. If you run
sudo rpi-imager from a terminal, this would not appear:
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:
I also wouldn’t recommend skipping verification. Make sure the image write went successful:
Once it is over, you will get the following confirmation:
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:
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.
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:
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:
And then create the user 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:
You can start enjoying Ubuntu desktop on Raspberry Pi now.
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.