Add Raspberry Pi repository in Ubuntu

I installed Ubuntu 20.04 LTS Server on my Raspberry Pi 4 8 GB and needed to install raspi-config. raspi-config is a simple (if long and involved) shell script to configure Pi hardware and Raspbian settings. It is just a front end to the underlying system commands. Found that I need to add Raspberry Pi repository in Ubuntu. This guide shows how to add those raspberry pi repository without overexlaining too much, just enough to get it working.

In Ubuntu 20.04 LTS, /etc/debian_version is bullseye/sid, so it seems to be based on bullseye (Debian 11.0). Since http://archive.raspberrypi.org/ does not have bullseye, I initially chose buster. Then I changed that to bullseye.

Since bullseye is bit newer, perhaps buster is the safer choice right now.. Code below works for both.

Add Raspberry Pi repository in Ubuntu - 2
Add Raspberry Pi repository in Ubuntu – 2

DEB-based distros (Ubuntu, etc.)

To add Raspberry Pi repository in Ubuntu, run the following two commands:

Buster

echo deb http://archive.raspberrypi.org/debian/ buster main | sudo tee /etc/apt/sources.list.d/raspberrypi.list

Bullseye

echo deb http://archive.raspberrypi.org/debian/ bullseye main | sudo tee /etc/apt/sources.list.d/raspberrypi.list

Then run

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7FA3303E
sudo apt-get update

That’s it, Raspberry Pi repository will be enabled on the OS and will automatically get updated too.

2 comments

  1. would this work for raspberry pi 3 ?

Leave your solution or comment to help others.

This site uses Akismet to reduce spam. Learn how your comment data is processed.