关于如何为树莓派启用root系统并开启ssh登录,可参考之前的文章。
国内支持raspbian的软件源(不完全统计,欢迎补充):
https://mirrors.cloud.tencent.com/raspbian/raspbian/
https://mirrors.cloud.tencent.com/raspberrypi/https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/
https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/
https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/https://mirrors.ustc.edu.cn/raspbian/raspbian/
https://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/
- 阿里云OPSX镜像站[缺]
https://mirrors.aliyun.com/raspbian/raspbian/
- 浙江大学开源标准化站[缺]
http://mirrors.zju.edu.cn/raspbian/raspbian/
http://mirrors.neusoft.edu.cn/raspbian/raspbian/
- 重庆大学开源软件镜像站[缺]
https://mirrors.cqu.edu.cn/raspbian/raspbian/
sudo cp /etc/apt/sources.list /etc/apt/sources.list.save
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.save
sudo cp /etc/apt/sources.list.save /etc/apt/sources.list
sudo cp /etc/apt/sources.list.d/raspi.list.save /etc/apt/sources.list.d/raspi.list
sudo sed -i "s?http://raspbian.raspberrypi.org/raspbian/?https://mirrors.sjtug.sjtu.edu.cn/raspbian/raspbian/?g" /etc/apt/sources.list
sudo sed -i "s?http://archive.raspberrypi.org/debian/?https://mirrors.sjtug.sjtu.edu.cn/raspberrypi/debian/?g" /etc/apt/sources.list.d/raspi.list
sudo sed -i "s?http://raspbian.raspberrypi.org/raspbian/?https://mirrors.cloud.tencent.com/raspbian/raspbian/?g" /etc/apt/sources.list
sudo sed -i "s?http://archive.raspberrypi.org/debian/?https://mirrors.cloud.tencent.com/raspberrypi/?g" /etc/apt/sources.list.d/raspi.list
sudo sed -i "s?http://raspbian.raspberrypi.org/raspbian/?https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/?g" /etc/apt/sources.list
sudo sed -i "s?http://archive.raspberrypi.org/debian/?https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/?g" /etc/apt/sources.list.d/raspi.list
sudo sed -i "s?http://raspbian.raspberrypi.org/raspbian/?https://mirrors.ustc.edu.cn/raspbian/raspbian/?g" /etc/apt/sources.list
sudo sed -i "s?http://archive.raspberrypi.org/debian/?https://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/?g" /etc/apt/sources.list.d/raspi.list
其他为提供raspberrypi存储库的源未写成一键脚本。
sudo apt update
sudo apt upgrade