Install Ubuntu on the Raspberry Pi

The Raspberry Pi is an ARM based SBC made in the UK.

Supported models

The following matrix maps all models of the Raspberry Pi against the releases of Ubuntu that support them.

Raspberry Pi

20.04 LTS

22.04 LTS

24.04 LTS

24.10

B+

A+

2B

S

S

[1]

[1]

3B

S

S

S

S

3B+

S

S

S

S

3A+

S

S

S

S

4B

S

SD [3]

SDC [4]

SD [4]

400

SD

SD

SD

5

SDC [4]

SD [4]

Zero

Zero W

Zero 2W

S

S

S

S

CM1

CM3

S

[2]

CM3+

S

S

S

S

CM4

SD [3]

SDC [4]

SD [4]

CM5

[5]

SD [4]

Key:

S

Server supported

D

Desktop supported

C

Certified (LTS releases only)

Using the pre-installed server image

  1. Download one of the supported images:

  2. Flash the pre-installed image to your selection of boot media (microSD card, USB mass-storage device or, on the CM4 or Pi 5, NVMe storage)

  3. If desired, customize the cloud-init configuration on the boot partition, found in the user-data and network-config files

  4. Attach the boot media to the board (for USB or NVMe this may require an adapter or HAT)

  5. Attach a screen and keyboard

  6. Power on the board

  7. Wait for an output line confirming that cloud-init has finished running; this service is responsible for generating SSH keys, and creating the default user:

    [   35.682018] cloud-init[909]: Cloud-init v. 24.1.3-0ubuntu3 finished at Tue, 23 Apr 2024 07:44:59 +0000. Datasource DataSourceNoCloud [seed=/var/lib/cloud/seed/nocloud-net][dsmode=net].  Up 35.65 seconds
    
  8. Login with the user ubuntu and the default password ubuntu (if you left the cloud-init configuration with its defaults); you will be asked to choose a new password

Using the pre-installed desktop image

  1. Download one of the supported images:

  2. Flash the pre-installed image to your selection of boot media (microSD card, USB mass-storage device or, on the CM4 or Pi 5, NVMe storage)

  3. Attach the boot media to the board (for USB or NVMe this may require an adapter or HAT)

  4. Attach a screen, keyboard, and mouse

  5. Power on the board

  6. Wait for the first-time setup wizard to start and follow the instructions

Cloud-init seed

The cloud-init seed for the pre-installed Raspberry Pi images is always located on the boot partition (the first partition in the image, formatted as FAT). Please note that, prior to the 24.04 LTS (noble) release, only the pre-installed server images provided cloud-init.

See Configure your board for headless use for more information.

UART console

The UART console is accessible via the GPIO header on all models except the Pi 5. Assuming the typical coloring of USB to TTL serial adapters the following connections have to be made:

Board

Adapter

GND, pin 6

GND, black

TX, pin 8

RX, white

RX, pin 10

TX, green

Do not connect the red 3.3 V wire.

A close-up of a traditional USB UART adapter connected to the UART on the GPIO header of a Raspberry Pi 4B

If you are using a Raspberry Pi debug probe, the coloring of wires is slightly different, and you must ensure that the lead is connected to the “U” port of the debug probe, but the connections on the GPIO header are similar:

Board

Debug Probe

GND, pin 6

GND, black

TX, pin 8

RX, yellow

RX, pin 10

TX, orange

A close-up of the Raspberry Pi debug probe connected to the UART on the GPIO header of a Raspberry Pi 4B

On the Pi 5, the serial console is accessed via the 3-pin UART header between the two micro-HDMI ports. The simplest means of using this UART is to use the Raspberry Pi debug probe connected as shown:

A close-up of the Raspberry Pi debug probe connected to the UART port located between the micro-HDMI ports of a Raspberry Pi 5.

If you wish to access the serial console via the GPIO header as on previous models, append the following line to config.txt on the boot partition:

dtparam=uart0_console

Connect with the following settings (see Connect to a UART console):

  • 115200 baud

  • 8 data bits

  • no parity

  • 1 stop bit

  • no flow control

Limitations

  • The libcamera stack is not currently operational on 24.04 (LP: #2038669)