# 备份当前的源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.backup
# 编辑 sources.list 文件
sudo sh -c 'echo "deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi" > /etc/apt/sources.list'
# 编辑 raspi.list 文件
sudo sh -c 'echo "deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main" > /etc/apt/sources.list.d/raspi.list'
# 更新软件包索引
sudo apt update
# 测试安装软件包
sudo apt install vim
01-25
2603
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-11
2371
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-20
3462
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-18
1607
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)