apt-get阿里源

备份原有配置文件

mv /etc/apt/sources.list /etc/apt/sources.list.bak

 

新建一个文件

vi /etc/apt/sources.list

 

复制以下内容到新的文件中,:wq保存。

复制代码
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
复制代码

更新源之后使用进行更新

sudo apt-get update
sudo apt-get upgrade

 

posted on 2018-05-31 21:46  wuzhuquan  阅读(461)  评论(0编辑  收藏  举报

导航