机型:树莓派4B
系统:Raspberry Pi OS (32 bit) beta
树莓派的默认账户密码:
默认用户名:pi 密码:raspberry。第一次启动时,系统会提示更改。
启动root账户的方法:
可以用默认账户pi的sudo执行
如果需要开启root账号,可以用pi用户登录后,在命令行执行:
sudo passwd root
根据密码设置提示输入两次密码,然后在执行:
sudo passwd --unlock root
这样可解锁root账户。
更换源:
备份源文件soruces.list和raspi.list
修改源文件:
修改sources.list文件:
root@raspberrypi:/etc/apt# vim sources.list
#deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# 注释掉以前的源,添加以下两行:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberry-pi-os/raspbian/ buster main non-free contrib rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspberry-pi-os/raspbian/ buster main non-free contrib rpi
修改raspi.list文件:
root@raspberrypi:/etc/apt# vim sources.list.d/raspi.list
#deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main
# 注释掉之前的,添加以下一行:
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui
同步更新源,软件包:
执行以下命令:
sudo apt-get update
sudo apt-get upgrade