Raspberry Pi Replacement Software Source

Table of contents

1. Backup source list: Before changing the software source, it is best to back up your current source list file.

2. Edit the source list file: use a text editor (such as nano or vi) to open the /etc/apt/sources.list file.

3. Replace the software source: Find the original official source address in the file (maybe like http://raspbian.raspberrypi.org/raspbian/), and replace it with the other source address you want to use. You can choose to use domestic mirror sites, such as Tsinghua University Mirror, Alibaba Cloud Mirror, etc. These mirror sites usually provide faster download speeds.

4. Save the file: After making changes, press Ctrl + X to save the file. Update software sources: Run the following command for the changes to take effect.


The name of the official Raspberry Pi operating system has been changed from Raspbian to Raspberry Pi OS (or Raspbian OS). The official software source of Raspberry Pi OS is the official Raspbian software source, which is mainly located at the following address:

2021 Raspberry Pi software source address (also accessible)

2022 Raspberry Pi software source address (still accessible)

Raspberry Pi OS uses APT (Advanced Packaging Tool) for software package management, and software sources can be configured by editing the /etc/apt/sources.list file. If there is a new official source, you can refer to the official website or the update of the Raspberry Pi community to get the latest information.

Changing software repositories on the Raspberry Pi is a common operation, especially if you wish to download packages from other mirror sites, or if the official repositories are slower. The following are the basic steps to change the software source on the Raspberry Pi:

1. Backup source list: Before changing the software source, it is best to back up your current source list file.

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

(The first two lines of commands are what I set up a static IP before, so don’t worry about it)  

 

2. Edit the source list file: use a text editor (such as nano or vi) to open the /etc/apt/sources.list file.

sudo nano /etc/apt/sources.list

(There is a problem with my display here. I used MobaXterm, which was copied directly. There may be a problem with the display) 

3. Replace the software source: Find the original official source address in the file (maybe like http://raspbian.raspberrypi.org/raspbian/), and replace it with the other source address you want to use. You can choose to use domestic mirror sites, such as Tsinghua University Mirror, Alibaba Cloud Mirror, etc. These mirror sites usually provide faster download speeds.

For example, to replace the software source with the mirror site of Tsinghua University, you can use the following address:

deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi

# Zhongke Dayuan

deb https://mirrors.ustc.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi

 

4. Save the file: After making changes, press Ctrl + X to save the file. Update software sources: Run the following command for the changes to take effect.

sudo apt update

Now your Raspberry Pi will use the new software source to download packages. Please note that when changing the software source, it is best to choose a reliable and trusted mirror site to ensure the safety and reliability of the software package. If you encounter any problems after changing the software source, you can restore the previous backup source list.


Update: There will be some problems with updating the software source according to my method. This is a link to quote someone else

software source

Guess you like

Origin blog.csdn.net/weixin_53000184/article/details/132087053