Ubuntu更换为阿里云软件源

Ubuntu更换为阿里云软件源Ubuntu 更换为阿里云软件源操作步骤 1 查看系统代号 lsb release a 如图所示 如果你需要自己编辑更新列表文件 etc apt sources list 你就会发现在 url 的后面紧跟着一个 codename

大家好,欢迎来到IT知识分享网。

Ubuntu更换为阿里云软件源

操作步骤:

1、 查看系统代号

lsb_release -a

如图所示:

Codename: bionic

补充:

Bionic Beaver(仿生海狸)

Ubuntu更换为阿里云软件源

codename的用途:

如果你需要自己编辑更新列表文件,/etc/apt/sources.list,你就会发现在url的后面紧跟着一个codename。下面会用到。

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

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

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

Ubuntu更换为阿里云软件源

3、 修改源文件内容

sudo vim /etc/apt/source.list

Ubuntu更换为阿里云软件源

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

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原文件内容全部删除,将阿里云文件内容粘贴进来

Ubuntu更换为阿里云软件源

4、更新源

Ubuntu更换为阿里云软件源

5、更新软件

Ubuntu更换为阿里云软件源

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

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

感谢支持。

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/90744.html

(0)

相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注微信