树莓派更改更新源

1、先用pi用户登录树莓派

          账号:pi

          密码:raspberry

2、然后修改超级用户root密码

         sudo passwd root

3、切换到root用户

          su - root

4、修改 /etc/apt/sources.list

         sudo nano /etc/apt/sources.list

         原文deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rp, 加#注释掉

         加入如下阿里源,deb http://mirrors.aliyun.com/raspbian/raspbian/ stretch main contrib non-free rpi

5、修改/etc/apt/sources.list.d/raspi.list

       sudo nano /etc/apt/sources.list.d/raspi.list

      原文deb http://archive.raspberrypi.org/debian/ stretch main ui, 加#

      加入如下科大源:deb http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ stretch main ui

6、更新系统和软件

        sudo apt-get update && apt-get upgrade
 

你可能感兴趣的:(树莓派)