Debian 9 换阿里包源

Debian 9 (stretch) 换阿里包源

修改/etc/apt/sources.list文件

替换成:

1
2
3
4
5
6
deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free

其中stretch可以替换成jessie或者wheezy

保存之后 :

1
apt-get update

参考文章

howto:在构建基于debian的docker基础镜像时,更换国内包源