Install Ubuntu Server on Raspberry Pi

January 01, 2022

In this blog post, we will be installing Ubuntu 20.04 LTS Server to the Raspberry Pi. This operating system offers a wide range of use cases, and we will be taking advantage of it in future posts.

1. Download the Ubuntu Server 20.04 LTS

Go to the Raspberry Pi section of the Ubuntu downloads and download the 20.04 LTS 64-bit version.

1

2. Download Balena Etcher

We will be using Balena Etcher to flash the OS to the Micro SD card. You can download Balena Etcher from this link.

2

3. Unzip the OS image

When the Ubuntu download is completed you can export it from .xz compressed format with a tool of your choice.

3

After the export, you should have a .img file.

3 1

4. Flash the OS to the SD Card

Start the Balena Etcher and select the .img file as the image and select the Micro SD card as the target and start flashing.

4

5. Setup Wi-Fi and SSH

When the flash is completed the Micro SD card will be unmounted. You can unplug and plug it again to mount it automatically. In order to set up the WiFi access for the Raspberry Pi running Ubuntu Server, you need to edit the file named network-config in the Micro SD card.

5

The file should look like below.

5 1

By uncommenting the relevant lines, you can add a new network SSID and password as you can see below.

5 2

Since we are using a server OS, the SSH will be enabled by default, so you don’t have to do anything for SSH configuration.

You can put the Micro SD card into the Pi and power it up.

6. Find the IP Address of the Raspberry Pi

When the Raspberry Pi boots up it will be connected to the WiFi network that you have configured. You can use any IP Scanner application to scan your network to spot the Raspberry Pi IP address. It will be shown as ‘ubuntu’.

6

7. Connect to the Raspberry Pi

With the IP address, you can use the command below to connect to the Raspberry Pi. Do not forget to change the IP address below to your actual Raspberry Pi IP address.

The password is: ‘ubuntu’

In the first login, the OS will ask you to change the password.

7 1

After changing the password your Ubuntu Server on Raspberry Pi is ready to use.

7

8. Update and Upgrade

Do not forget to update the package list and upgrade the outdated packages.

sudo apt update
sudo apt upgrade

8


Profile picture

Written by Can Berk Durmus, a computer engineer. He uses OpenCV, CUDA, and QT with Python and C++. He feels comfortable around resource-limited tiny computers and autonomously flying robots.

© 2022