Debian9更换国内源的方法,Debian9更换国内镜像地址

     日常     1760次   

备份原有的源配置文件

cp /etc/apt/sources.list /etc/apt/sources.listbak

删除该源配置文件

rm -f /etc/apt/sources.list

生成国内的源配置文件

echo "deb http://ftp.cn.debian.org/debian/ stretch main" > /etc/apt/sources.list
echo "deb http://ftp.cn.debian.org/debian/ stretch-updates main" >> /etc/apt/sources.list
echo "deb http://ftp.cn.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list

更新源

apt-get update

debian的全球镜像站:
https://www.debian.org/mirror/list

发表新评论