complete guide to ubuntu on raspberry pi

The Ultimate Guide to Get Started with Ubuntu on Raspberry Pi

Ubuntu is a popular Linux distribution on PC and now officially supports Raspberry Pi, with a pre-built release for the device. It’s natural to see more and more users interested in trying it, but like anything new on Raspberry Pi, you may need a guide to help you to set this system up. You are at the right place, I’ll explain everything in this step-by-step tutorial.

Ubuntu is now directly available in Raspberry Pi Imager, which is the easiest way to install it on a Raspberry Pi. Insert an SD card into your computer, start Raspberry Pi Imager, and choose Ubuntu in the OS list, under “Other general-purpose OS”.

If you are familiar with Raspberry Pi OS, the following steps might be a bit overwhelming, so keep reading to learn exactly how to complete the installation and do your first step on this new Linux distribution.

If you need help getting started on Raspberry Pi, I have an entire course to guide you through your first steps. I’ll help you use the perfect hardware, plug everything in and install your first system. You’ll also do your first projects with me, just to make sure you are ready for the next level. Get all the information on this page if you are interested.

How To Install Ubuntu On Raspberry Pi

Here are the required steps to install Ubuntu on Raspberry Pi:

  • Download and install Raspberry Pi Imager on your computer.
  • Insert an SD card.
  • Use Raspberry Pi Imager to flash Ubuntu onto the SD card.
  • Boot the Raspberry Pi with this new SD card.

I’ll now explain each step in detail.

If you prefer, you can find a video tutorial at the end of this page.

Download Raspberry Pi Imager

As explained in the introduction, the easiest way to get Ubuntu running on your Raspberry Pi is to use Raspberry Pi Imager, which you’ll find on the official website:

  • Open the software page of the official website.
  • Download the version corresponding to your operating system.
    It’s compatible with Windows, macOS and Linux. You can even use your Raspberry Pi directly if Raspberry Pi OS is already installed:
    sudo apt install rpi-imager

Once installed, you can move to the next step to copy the Ubuntu files to your SD card.

Flash Ubuntu on a SD card or USB drive

Ubuntu is now available in the OS list in Raspberry Pi Imager, so flashing it will be straightforward:

  • Open Raspberry Pi Imager on your computer.
  • Insert your SD card.
    You can also use a USB drive if your Raspberry Pi model supports it (more details about this in my course, if needed).
  • Click on “Choose OS” and “Other general-purpose OS”.
    Ubuntu is listed there, click on it to see all versions currently available.
  • Pick a version corresponding to your Raspberry Pi model and goals.
    For example, the first one is perfect for desktop use on a Raspberry Pi 4 or 400.
    For older models, you may need to start with a Server version, and install the desktop environment later if needed. I will explain how to do this in the next part.
    You can also check the ‘System Versions’ section in this article to better understand the differences between them.
  • Then, click on “Choose Storage” and select your SD card or USB drive in the list.
  • Click “Write” to start the file copy.

After a few minutes, your SD card is ready to use, and you can move to the next step.

Note: If you want to use another tool (like Balena Etcher) or version (Desktop / Core / Server), you can check the Ubuntu website page for Raspberry Pi here.

First Boot on Ubuntu

Insert the SD card you just flashed into your Raspberry Pi, and power it on.

From there, your experience will be different if you are using Ubuntu Server or Ubuntu Desktop, so I’ll explain the following steps in both cases.

Download the Pi Glossary!
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
Download now

Getting started with Ubuntu Desktop

The first boot on Ubuntu Desktop is straightforward, as a wizard will help you to get started with the basic configuration. This step is a bit too long in my opinion, but it’s not that complicated:

  • Start by choosing your language, keyboard layout and time zone.
  • Then, you need to create your first user.
    On Raspberry Pi OS, you are used to getting the same default user on each new installation. On Ubuntu, you have to create it yourself which is better for security reasons (obviously don’t use the same login/password as on RPI OS).
  • Then the system installation will start.
    Ubuntu is one of the few distributions that needs an installation step after flashing the SD card. Just be patient, it will take a few minutes (something like 10 minutes on my Raspberry Pi 4).

At the end of this step, the desktop environment will be created and another wizard will show up. It will help you connect online accounts, configure data sharing with Ubuntu developers, and things like that. Overall, you can just skip it and start using Ubuntu as you would on a PC.

I recommend that you read the end of this article (the next parts are about Ubuntu Server), especially if you are new to Ubuntu. I will explain the differences with Raspberry Pi OS, and how to do certain things to get the most out of Ubuntu.

Getting started with Ubuntu Server

The first boot on Ubuntu Server is less user-friendly, but don’t worry, I’ll help you:

  • If there are a ton of weird messages on your screen, just press Enter to get the login prompt.
  • Log in with the default credentials: ubuntu/ubuntu.
  • The system will ask you to set a new password.
    Type the current password once more (“ubuntu”) and pick another one for your next session.
    Warning: you are in QWERTY by default, if you are using another keyboard layout, make sure to take this in consideration.
  • You will then get access to the terminal, logged in as ubuntu (the default user).

From there, I recommend starting with a few additional steps:

  • Fix the keyboard layout if needed:
    • If you don’t have a US keyboard, use this command to set the correct layout before anything else:
      sudo dpkg-reconfigure keyboard-layout
      Remember that you can use the “TAB” key to autofill the command name and parameter, which might be easier if you don’t have the correct layout setup.
    • Pick your keyboard type, layout and options in the wizard.
    • This step may take a while, I don’t know exactly why, but it reconfigures tons of things on your system.
    • A reboot might be required to apply changes.
  • Connect to a Wi-Fi network:
    • If possible use an Ethernet cable, as it’s generally way easier to get started, but if not possible, here is how to connect to a Wi-Fi network.
    • There is no easy tool like raspi-config to configure the Wi-Fi network if you don’t have an Ethernet connection first. Open this configuration file:
      sudoedit /etc/netplan/50-cloud-init.yaml
    • Add a new paragraph like the “ethernets” one, for the Wi-Fi configuration:
      wifis:
      wlan0:
      optional: true
      access-points:
      "YOUR-SSID":
      password: "YOUR-PASSWORD"
      dhcp4: true
    • Make sure to maintain a similar indentation to what is already there for the Ethernet configuration.
      My file looks like:
    • Once done, save and exit (CTRL+O, CTRL+X) and apply the changes with:
      sudo netplan apply
      If it doesn’t work, try:
      sudo netplan --debug apply
      And check if there are any errors.
    • You can check if it worked with:
      ip a
      If you see an interface named “wlan0” with an IP address on your network, it’s good!

      If you need more details about this, I have an entire tutorial here dedicated to the Wi-Fi configuration on Ubuntu.
  • Update your system:
    • Now that the keyboard layout and the network connection are well configured, you can update your system before doing anything else:
      sudo apt update

From there, you can use Ubuntu Server like any other terminal-only system. I recommend using SSH (which is enabled by default), as it’s generally more comfortable to follow tutorials from your computer, but it’s not mandatory.

Related: How to Set Static IP Address on Ubuntu Server (Step-by-step)

Install a Desktop Environment on Ubuntu Server

Even if you started with Ubuntu Server, and are now limited to what you can do with it, it’s still possible to install a desktop environment over it. Also, there is no Ubuntu Desktop version officially supported for old Raspberry Pi models, so this might be something you can try.

I guess if Ubuntu isn’t offering a desktop version for Raspberry Pi 3 and older, there is probably a reason and it’s likely related to performance, but you can try to build a leaner OS with a lightweight desktop environment.

The default desktop environment on Ubuntu Desktop is GNOME, which is the heaviest option, so not necessarily the best idea, especially if you have an older Raspberry Pi model. Here are the solutions you can try:

  • GNOME: it should be fine with a Raspberry Pi 4 or 400.
    Installation:
    sudo apt install ubuntu-desktop
  • KDE: Should work better than GNOME on most models, but still a bit heavy for Raspberry Pi.
    Installation:
    sudo apt install kubuntu-desktop
  • LXDE: If you like the Raspberry Pi OS interface, it’s almost the same thing. Better performance overall.
    Installation:
    sudo apt install lubuntu-desktop
  • XFCE: Another great option for performance.
    Installation:
    sudo apt install xubuntu-desktop
    I have a full guide explaining how to install XFCE on Ubuntu Server if you want more details.

Other packages might be available in the default repository, feel free to do some research if you really want another. For example, Cinnamon is available too (cinnamon-desktop-environment).

If you want to start with the minimum required, you can use the “–no-install-recommends” option in your apt command, something like:
sudo apt install --no-install-recommends <package-name>

I tried it for you, the installation took a while, but everything worked fine after the reboot. You need to choose a display manager during the installation (I kept gdm3, the default option), but aside from that, it’s straightforward. I tested on a Raspberry Pi 4, so I can’t tell how each environment works on each model, but the installation is not that complicated.

Differences Between Ubuntu And Raspberry Pi OS

Even if Ubuntu and Raspberry Pi OS are based on Debian, they have taken a different path, and the user experience with these two systems is clearly different now. Here are a few key differences you need to know, especially if you are new to Ubuntu.

System versions

Ubuntu and Raspberry Pi OS both offer three different versions to their users, but they only have two in common: a lite version and a desktop version. The third one has a different purpose in both cases.

Raspberry Pi OS is available in three versions:

  • Desktop: includes a desktop environment (PiXeL) and a few apps to get started (like Chromium).
  • Lite: a minimal operating system, for servers, robots and projects where no interface is required.
  • Desktop with recommended software (Full): take the desktop version preloaded with 10 to 20 recommended apps, and you get this version. If you need a lot of the apps that are recommended by the Raspberry Pi Foundation (LibreOffice, programming tools, etc.), this is your best choice.

The first one is the same with Ubuntu. The second one is named “Ubuntu Server”, but basically, it’s the same idea. And Ubuntu also has a third option, named “Ubuntu Core”. This version targets IOT projects, with a containerized OS (using mainly snaps). This might be something to consider for large deployments or devices installed in a public environment, but for home projects, this is not really useful.

The other difference is that Ubuntu is now pushing the 64-bit version by default, which is not (yet) the case for Raspberry Pi OS. If you have a recent Raspberry Pi model, you should see a gain in performance with this architecture (I’ll talk a bit more about performance later).

Default applications

With Raspberry Pi OS, you have the choice between the Desktop and the Full version. So, you can start lean, with only a web browser and the basic tools, or start with a bunch of other apps (LibreOffice, VLC, Scratch, etc.), to avoid the manual installation process.

Ubuntu doesn’t have the second option, so I will only compare the two Desktop editions here. The main difference is that Ubuntu uses the GNOME desktop environment while Raspberry Pi runs on a customized edition of LXDE, named PiXeL. So, the interface is quite different, and I’ll give you more details on this point in the next parts.

Download the Pi Glossary!
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
Download now

The other main difference is that Ubuntu includes Firefox by default, while Raspberry Pi OS uses Chromium. Firefox is open-source software, while Chromium is generally seen as “corporate” software, as it’s an open-source version of Google Chrome. That’s probably one reason why Ubuntu prefers it.

But in my experience, Chromium works better on Raspberry Pi, which is probably why the Raspberry Pi Foundation made this choice. We’ll see in the performance results if it’s still true on the latest Ubuntu versions, but anyway, you can install both easily on both systems, so it’s not a big deal.

Aside from that, Ubuntu comes with more small tools (like games, video player, backup tool, etc.) than Raspberry Pi OS. So, it might be a better experience, as these tools aren’t necessarily easy to find in the default repository. But in both cases, you’ll need to install the most important apps after the installation, as there is nothing by default to really “work” on these systems (programming, office tools, drawing, etc.).

New applications installation

Installing new apps on Raspberry Pi OS, and most of the Linux distributions, in general, can be a nightmare. Let’s say you want a drawing app, but don’t know the names of the applications, good luck to find one with APT or the default package manager.

And even when you know the package name, it might be complicated. If you search “firefox” in the Add/Remove software tool on Raspberry Pi, you’ll get dozens of results.

Modern distributions like Ubuntu add a better option, with an app store like you are used to on your smartphone. Apps are sorted by categories, and dependencies are not displayed in this tool, which decreases the number of results, making it easier to use.

On Ubuntu, it looks like:

Overall, it’s a bit slow on Raspberry Pi (especially the first time), but finding and installing apps is way easier. For example, you’ll quickly find Chromium with the search engine, can see a preview of it (screenshots), and install it in one click:

We really need something like that on Raspberry Pi. And aside from Pi-Apps (which is very limited in the number of apps supported), there isn’t a good option for now.

System settings

Another thing that is a bit messy on Raspberry Pi is the system configuration. You do the basic configuration in the welcome wizard on first boot, then you have the Raspberry Pi configuration tool, raspi-config, and many other small apps to change the appearance, the display configuration, etc.

GNOME and KDE offer a better experience, with everything in the same app, like a control center. Ubuntu uses GNOME by default, so you’ll get that kind of tool to configure everything on your system:

Whatever you want to tweak, you know that you’ll find it there. The left menu is intuitive, and there is also a search engine if you aren’t quite sure where to look. For example, type “layout”, and it will directly open the keyboard layout configuration.

Overall, Ubuntu (Desktop) offers a better user experience than Raspberry Pi OS, thanks to years of improvements for PC users. But what about the performance? Raspberry Pi OS is supposed to be optimized for Raspberry Pi. Is Ubuntu really slower? That’s what we’ll check in the next part of this guide.

Ubuntu Performances On Raspberry Pi

As a whole, Ubuntu isn’t the fastest operating system on Raspberry Pi. There is a choice to be made between performance and convenience. Ubuntu is great if you are looking for a good user experience, not necessarily for performance (due to the use of GNOME and Firefox, for example).

To give you a better idea of what to expect, I did some performance tests on my Raspberry Pi 4 (4 GB of RAM) with Ubuntu 22.04 (development release). Here are my results.

Time to boot

Ubuntu 22.04 boots in almost 37 seconds on a Raspberry Pi 4, which is almost two times slower than Raspberry Pi OS (which boots in 21 seconds on the same device).

Even if a few things are preinstalled, it’s already slower. GNOME is heavier to load, and there are other background services to start that may explain this difference. Keep in mind that Raspberry Pi OS is optimized for the Raspberry Pi, so this is not really a big surprise.

Taking 15 seconds more to boot is not necessarily a big deal if you use it for long periods, so let’s take a look at my other tests before jumping to a conclusion.

Time to open apps

Once Ubuntu is completely loaded, the performances are more in touch with what we are used to on Raspberry Pi OS. Ubuntu is even faster with some applications, like LibreOffice, probably due to the 64-bit support.

Raspberry Pi OSUbuntu
Time to open Writer8s5s
Time to open the default web browser3s8s

One thing that I don’t like with the default settings is Firefox. We’ll see the browser performance just after that, but one thing to consider is that Firefox is almost 3 times slower to launch versus Chromium on Raspberry Pi OS.

It doesn’t mean that web browsing is always slower, but if you frequently open your browser to quickly check something, Firefox is not the best choice.

Default browser performance

Once the browser open, Firefox and Chromium get similar results with benchmark tools like Speedometer.

This test is checking the base performance, like how many checkboxes the browser can check in a minute. This is helpful to compare it with other browsers as I did in this article. As you can see, Chromium and Firefox both got a result around 13 runs per minute.

Anyway, you can easily change your default browser from one to another, so I don’t think you’ll choose to try Ubuntu (or not) due to the use of Firefox by default. Just keep in mind that Firefox is generally slower to start, but then it’s not that different from Chromium.

I also did some tests with YouTube, without noticing a major difference with Raspberry Pi OS. And the same conclusion in this case, if the default setup doesn’t work well for you with Ubuntu, you can always tweak it and use other applications or settings.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Video: Ubuntu vs RPI OS

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Want to chat with other Raspberry Pi enthusiasts? Join the community, share your current projects and ask for help directly in the forums.

Alternatives To Ubuntu On Raspberry Pi

Overall, Ubuntu on Raspberry Pi is a decent choice for desktop usage. Thanks to the 64-bit architecture and several optimizations that have been done, it’s improving with each new version.

Just keep in mind that Raspberry Pi OS will always be more compatible, more optimized and generally with a better support and community than other distributions for Raspberry Pi users.

If you are not convinced that Ubuntu is worth giving it a try for now, here are a few other suggestions to find the best system for you.

Pop!_OS

I recently tried Pop!_OS on Raspberry Pi, and was impressed by the results I got. There are many similarities with the distribution we talked about in this article, but they also improved other things, like the first boot and some tweaks with the default desktop layout. Click on the link to get more details.

Raspberry Pi OS with a few tweaks

Raspberry Pi OS isn’t the most beautiful operating system by default, but that doesn’t mean that you can’t improve it. It has now been updated to the latest Debian version, and 64-bit support is now available.

I would still recommend starting with it, even if you have to change the desktop environment or customize the PiXeL appearance. There is no “app store” on Raspberry Pi OS, but Pi-Apps does a great job helping you with the installation of some applications, that might be enough for you.

❤️ Love Raspberry Pi & writing?
Combine your passions and get paid. Write for RaspberryTips!

Other options

And if none of these are a good fit, you can take a look at my list of the 15 best distributions for Raspberry Pi or watch this video where I compared 4 of the best ones face to face:

Whenever you’re ready, here are other ways I can help you:

The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts