Debian9.4更换源的正确姿势

#备份原有的源配置文件

$ 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

猜你喜欢

转载自blog.csdn.net/github_38313789/article/details/80675556