Ubuntu更换阿里云软件源
- 备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.修改
sudo vim /etc/apt/sources.list
将source.list文件内容替换成下面的
deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial stable
# deb-src [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial stable
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe
# deb-src [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu xenial stable
- 更新
source /etc/apt/sources.list
sudo apt-get update
网友评论