ubuntu server on raspberry pi

How to Install Ubuntu Server 26.04 on Raspberry Pi

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

I like Ubuntu Server on a Raspberry Pi when I want something close to a “real” Linux server, without the desktop tools I don’t need. It’s a good fit for a home server, a small lab, or anything that will mostly run in the background. The only downside is that the first boot drops you straight into the command line, which can feel a bit dry if you’re used to Raspberry Pi OS with a desktop.

Ubuntu Server 26.04 is officially available for recent Raspberry Pi models and can be installed with Raspberry Pi Imager or downloaded directly from Ubuntu. It runs without a desktop interface and can be flashed to an SD card or USB drive.

Let’s start with the installation procedure, and then I’ll give you a few tips on how to configure and use this system. I’ll even show you how to install any desktop environment on it if you want to try one.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

How to Install Ubuntu Server on Raspberry Pi

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

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

I’ll now explain each step in detail. I’ll also give you an alternative method if you prefer to use Balena Etcher or another tool.

Method 1: Use Raspberry Pi Imager

The easiest way to get Ubuntu Server running on your Raspberry Pi is to use Raspberry Pi Imager, which you can download from the official website.

Install Raspberry Pi Imager on Your PC or Raspberry Pi

Here’s how to get Raspberry Pi Imager:

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

Flash Ubuntu Server on an SD Card or USB Drive

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

Something not working as expected?
You can get answers from real experts in minutes.
Get help with your setup
  • Launch Raspberry Pi Imager on your PC and make the following selections.
  • Device – Select which Raspberry Pi board you have.
  • OS – Scroll down and select Other general-purpose OS.
  • Select Ubuntu to see all versions, and select Ubuntu Server.
    (Pick the 64-bit version if your model supports it.)
  • StorageInsert your SD card and select it from the list.
    You can also use a USB drive if your Raspberry Pi model supports it (more details about this in the community, if needed).
  • Customisation – In this section, you can change the default options for your installation (username, password, enabling SSH, etc.).

    I recommend doing it in this case. We’ll be using a terminal-only system, which means everything you don’t configure now will have to be done in complicated command lines.
    (For more on what these settings, check out our guide to Raspberry Pi Imager.)
  • Writing – You should get a summary here that looks something like this:
  • Finally, start the installation by clicking on WRITE.

Raspberry Pi Imager will then start copying the system files to your installation storage. After a few minutes, your SD card is ready to use, and you can move to the next step.

Note: You’ll also find Ubuntu Core available on the OS list.
Read this article to decide whether you should use Ubuntu Server or Ubuntu Core.

Method 2: Manual Installation

If you prefer, you can always get the Ubuntu image manually from the official website.
Sometimes, Raspberry Pi Imager doesn’t have the latest version list, or maybe you prefer using another tool, it’s fine.

Go to this page on the Ubuntu website, and scroll down to the “Download Ubuntu Server” section.
You have several choices here:

  • LTS version: recommended for use on production servers, with longer-term support (you’ll receive updates for five years).
  • The latest version: Can be the same one or a more recent image, updated every 6 months, including the latest package versions. It should be fine for personal use, it’s stable enough for your Raspberry Pi, and you can upgrade it when the next release is available.
  • 64-bit or 32-bit: Pick the 64-bit edition if you have a recent Raspberry Pi model.
    Unlike Raspberry Pi OS, Ubuntu 64-bit has been the default for a long time, I didn’t notice any major issues using it (more details about the differences between 64 and 32 bits here).

Once you have the image downloaded on your computer, use your favorite tool to flash it on your SD card or USB drive. I generally recommend using Raspberry Pi Imager, and choosing “Use custom” in the OS list, but you can use Balena Etcher or any other tool if you prefer.

Getting Started With Ubuntu Server on Raspberry Pi

As mentioned in the introduction, your first boot with Ubuntu Server won’t be as welcoming as with Ubuntu Desktop or other distributions. You’ll only see a black screen with a small font to start with.

Let me guide you through the first steps :-).

First Boot

Unlike on PC or with the Desktop edition, there is no welcome wizard on the latest version of Ubuntu Server. You get directly to the login prompt, where you can enter your login and password.

Recommended next step
Master Raspberry Pi in 30 Days

If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.

Check the book here

Note: You may need to wait a few seconds before the prompt appears. Some initialization steps may be running in the background (I noticed APT updates running for example).

If you used the “OS customisation options” in Raspberry Pi Imager and defined a specific user and password, you can use it directly to log in:

If you didn’t set the user / password in Raspberry Pi Imager, or went with a manual installation instead, the default login details are:

  • Login: ubuntu
  • Password: ubuntu

In this case, you’ll be required to change the default password immediately on first login.

Keyboard Configuration

Unless you specified it via Raspberry Pi Imager, the default keyboard configuration will be set to QWERTY (US). And even if you used Raspberry Pi Imager, a reboot might be required to get the correct layout.

This can already be a challenge to log in for the first time if (like me) you use a different keyboard layout, with a strong password. Here is a picture to help you with this first step:

qwerty keyboard layout

Anyway, once logged in, I recommend setting up the correct keyboard layout before anything else.

Use this command to run the wizard:
sudo dpkg-reconfigure keyboard-configuration

ubuntu server change keyboard layout

You’ll get access to a configuration tool, where you can select your country, layout and a few additional settings about your keyboard.

A reboot is required to apply the configuration after that:
sudo reboot

On the next boot, you should be able to use your layout to log in and move onto the next steps.

Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.

Network Configuration

When plugged into a network cable, Ubuntu Server should automatically get assigned an IP address by the DHCP server (the Internet router in most cases).

You can use this command to make sure it worked:
ip a

ubuntu server ip a command

As you can see on my screenshot, I can see my current IP address (192.168.222.9) in the wlan0 section. It means I’m already connected to my local network and to the Internet, which should be the case for you too on “normal” home networks.

If you need to use a Wi-Fi connection, I would start with an Ethernet cable and configure it from there, or try to do it from Raspberry Imager options directly. In my case, Imager did not get my Wi-Fi working out of the box.

The manual Wi-Fi configuration from the command line directly is a bit complicated, so I wrote a specific articles about it, you can find more details here:

System Updates

Once the initial configuration is done (user, keyboard layout and network), it’s a good practice to download and install the latest security updates on your new system.

Like with Raspberry Pi OS and all Debian-based distributions, Ubuntu Server uses APT, so it can be done easily with:
sudo apt update
sudo apt upgrade

A reboot is probably a good idea if you download many updates in your first run, especially if, like in my example, there is a new kernel available:

You should at least accept to restart all the services, and likely restart the whole system with:
sudo reboot

Optional: you can tweak a few things to make this black screen look better, check this for the details: How to Increase Font Size in the Linux Terminal (+ Bonus tips)

Enable SSH

On Ubuntu Server, SSH is installed and enabled by default, as soon as the default user and password are set.

So, at this stage, if you followed all the previous steps, you are connected to the network, know your user and password, and can connect to it directly from your computer:

If you need any additional guidance on how to use SSH to control your Raspberry Pi, click on this link to learn everything about it. The article is for Raspberry Pi OS, but it’s almost the same thing on Ubuntu.

Install New Applications

Ubuntu Server comes with two methods to install new applications:

  • APT: The default package manager for any Debian-based distribution. You can use it with the same commands as on Raspberry Pi OS, to install standalone applications, for example:
    sudo apt install <package-name>
  • SNAP: Snap is available natively on Ubuntu and allows you to install applications as a complete archive, including all the required dependencies and installing them in a distinct container.
    You can browse the snap store online, or use the command line to find and install new snaps on Ubuntu.
    snap search <string>
    snap install <name>

The main difference between Snap and APT is that apt will install an individual package on the system whereas Snap downloads a whole archive, with all the prerequisites inside, and installs it in a confined folder that’s isolated from the system.

I explain all the differences between Snap and Apt in this article. Some people love snaps, as it makes their life easier (one command to install NextCloud instead of following a long tutorial), while others criticize the lack of control.

Anyway, it’s not the point of this article; for now, just remember that both are available on Ubuntu Server. You can follow almost all the tutorials on this website, even if they are made for Raspberry Pi OS, it shouldn’t be that different.


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

Something not working? Don't waste hours going in circles. Ask in the RaspberryTips Community and get help from people who've already figured it out. Get unstuck now.

Upgrade Ubuntu Server With a Desktop Environment

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.

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. Therefore, starting with a minimal Ubuntu Server, and then installing a different desktop environment can be a good way to maximize convenience and performance.

As Ubuntu Server does not offer all desktop environments in direct download for Raspberry Pi, a strategy to consider is to install Xubuntu or Kubuntu. Installing these packages will also install XFCE or KDE desktop environments, respectively.

ubuntu server install kubuntu desktop environment

Here are some desktop environments you can try:

  • XFCE: A 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.
  • KDE: Customizable with pretty graphics. KDE should run slightly better than GNOME on most models, albeit still a bit heavy for Raspberry Pi.
    Installation:
    sudo apt install kubuntu-desktop
  • LXDE: If you like Raspberry Pi OS, it’s almost the same, with better performance overall.
    Installation:
    sudo apt install lubuntu-desktop
  • GNOME: it should run fine on Raspberry Pi 5, Pi 4, or Pi 400, if you have 4 GB RAM.
    Installation:
    sudo apt install ubuntu-desktop

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 (cinnamon-desktop-environment) and MATE too (ubuntu-mate-desktop).

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, and you might need to install it manually with some environments (I kept gdm3, the default option), but aside from that, it’s straightforward.

I only 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, so you should be able to quickly figure out what’s the right setup for you.

If you want to learn more about Ubuntu, and how to use Ubuntu Server especially, I have a ton of tutorials on this website, so feel free to check them too:

Not getting the same result?

Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.

Ask your question now
🔒 No risk. Cancel anytime.
  • Get help on your exact issue
  • Access step-by-step videos for tricky setups
  • Browse the website without ads

Similar Posts

Leave a Reply

Community members only
Comments are reserved for RaspberryTips Community members. Join the community to ask questions, get help, and interact with other Raspberry Pi users.

Join the community  or  log in