- Using tools like Raspberry Pi Imager or BalenaEtcher makes it easier to dump system images onto microSD cards.
- There are several variants of Ubuntu, from official versions to optimized flavors like Ubuntu MATE or RaspEX to improve performance.
- Managing permissions using commands like chmod +x is essential for running external binaries in Linux environments.
- Resizing disk partitions is a critical step in taking advantage of the total storage capacity.
If you've just gotten your hands on a Raspberry Pi 5, you're probably excited to start tinkering with the world of Linux. While the default operating system is great, many users prefer to switch to Ubuntu because of its versatility and the huge support ecosystem behind it. It's nothing groundbreaking, but if you're coming from Windows, some things might seem a little strange at first.
Installing this system on your Raspberry Pi is a fairly straightforward process, although it's worth noting that not all versions of Ubuntu perform equally well on Raspberry Pi hardware. Depending on whether you're looking for something lightweight for basic tasks or a more complete desktop experience, you'll need to choose between different "flavors" or custom images to ensure your system has sufficient power.
Preparing the ground and recording the system

To begin, the first step is to obtain the operating system image. You can choose the official versions or alternatives like Ubuntu MATE or RaspEX , which are better suited for this type of hardware. Once you have the file (which usually comes in .img format or compressed in a .zip file), you'll need a tool to "burn" it to the microSD card. One of the simplest and most reliable options is balenaEtcher , which works on any computer, although the official Raspberry Pi Imager is the safest bet for the Pi 5.
The process is a piece of cake: open the program, select the downloaded image, choose your microSD card, and click write. Be patient, as the image file is large and may take a few minutes. Once it's finished, you can remove the card and insert it into the powered-off Raspberry Pi.
Initial boot and storage optimization

Once the microSD card is inserted, connect the monitor, keyboard, and mouse, and then power it on. On first boot, the system will perform some automatic configurations. It will ask for basic information such as language, time zone , and to create your user account. If you are using a distribution like RaspEX, remember that the default username is usually "raspex" with the same password, although it is highly recommended to change your passwords immediately for security reasons.
A common problem is that, upon startup, the system doesn't recognize the full capacity of the microSD card. To fix this, you can open the terminal and use tools like fdisk to erase and recreate the data partition, or run the command resize2fs . This will allow Ubuntu to utilize every available gigabyte on your card, preventing you from running out of space five minutes after installing a couple of programs.
How to install software and run binaries on Linux

This is where those of us coming from Windows get our first shock. Linux doesn't have .exe files; package managers like apt or dpkg rule the roost . If you need a program, the most common way is to install it from the terminal with a simple command. But what if you download a ZIP file with folders called bin and lib ? That means you have pre-compiled software that doesn't require a traditional installer.
Instead of looking for a setup.exe file, you should extract the files to a folder in your user directory. If you want the program to be accessible from anywhere, you could move the executables to /usr/bin and the libraries to /usr/lib , although it's safer to leave them in your home directory to start with. The most important thing is that the executable file has the correct permissions; to do this, open a terminal in that directory and use the command ` chmod +x filename` . This tells the system that the file is a program and has permission to run.
Alternatives and lightweight versions

If you notice the system is running a bit slow, remember that there are much lighter desktop environments available. While GNOME or KDE can be too resource-intensive, options like LXDE or Xfce run incredibly fast on the Raspberry Pi. Projects like Ubuntu Pi FlavourMaker allow you to adapt various Ubuntu flavors to the ARM architecture, preventing the hardware from becoming overloaded due to insufficient RAM or processor power.
To verify that everything is working correctly, you can run a small Python 3 script that tells you the exact model of your motherboard and system architecture. This is very useful for ensuring you're using the correct software version and that the GPIO and SPI ports are responding as they should.
Running Ubuntu on a Raspberry Pi 5 opens up a huge range of possibilities, from turning it into a server to using it as a basic computer. The key is choosing the right image, managing the microSD card space effectively, and getting over your fear of using the terminal to handle file permissions and package installation.
FAQ
How do I install Ubuntu on the Raspberry Pi 5?
You must download a compatible Ubuntu image, burn it to a microSD card using tools such as balenaEtcher or Raspberry Pi Imager, and then boot the board with that card.
What do I do if Ubuntu doesn't recognize all the space on my SD card?
It is necessary to resize the partition using commands such as fdisk to adjust the size and resize2fs so that the file system occupies all available capacity.
What is the difference between Ubuntu MATE, RaspEX, and the official Ubuntu?
The official versions are the standard, while Ubuntu MATE and RaspEX are optimized distributions with lighter desktop environments to improve performance on limited hardware.
How do I run a program downloaded from a ZIP file that contains bin and lib folders?
You need to decompress the files and assign execution permissions to the binary file using the command chmod +x before attempting to launch it from the terminal.
Can I manually copy files to /usr/bin and /usr/lib?
Yes, it is possible, although it requires superuser (root) privileges and is recommended for experienced users to avoid conflicts with the system's package manager.
Which desktop environment is best for making the Raspberry Pi run faster?
Lightweight desktops like LXDE or Xfce are the best options since they consume far fewer RAM and processor resources than GNOME or KDE.