國內安裝debian,當然要用國內的源,優點只有一個:速度快。國內的源比較多,下面就把更改源的方法說一下。
登錄到debian 10,如果是root用戶,直接輸入命令,如果是非root用戶,需要在命令前面加上sudo。
一,先備份一下原始的源
mv /etc/apt/sources.list /etc/apt/sources.list.bak
這樣就把原始的源文件改了一個名字,備份一下,不好刪掉。
二,更新為國內的源
然后把下面的源地址復制進去sources.list文件
deb http://mirrors.ustc.edu.cn/debian/ buster main
deb-src http://mirrors.ustc.edu.cn/debian/ buster maindeb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main# buster-updates, previously known as 'volatile'
deb http://mirrors.ustc.edu.cn/debian/ buster-updates main
deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates maindeb http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib
保存
三,更新一下源
apt-get update