ubuntu16.04 更换阿里云源

2020-05-05  本文已影响0人  designer

Ubuntu更换阿里云软件源

  1. 备份
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

  1. 更新
source /etc/apt/sources.list

sudo apt-get update
上一篇下一篇

猜你喜欢

热点阅读