Ubuntu更换软件源

Ubuntu更换为阿里云软件源

操作步骤:

1、 查看系统代

lsb_release -a

如图所示:

Codename: bionic

补充:

Bionic Beaver(仿生海狸)

codename的用途:

2、 备份Ubuntu系统的官方源文件

这个不用多说了,操作系统文件注意备份!!!

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

3、 修改源文件内容

sudo vim /etc/apt/source.list

阿里源文件内容(其他源同理):

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

将source.list原文件内容全部删除,将阿里云文件内容粘贴进来

4、更新源

5、更新软件

欢迎大家给予宝贵的意见或者建议。

欢迎大家补充或者共享一些其他的方法。

感谢支持。

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2019年3月3日
下一篇 2019年3月3日

相关推荐