美文网首页
将 Ubuntu 默认源修改为国内源

将 Ubuntu 默认源修改为国内源

作者: 小叶与小茶 | 来源:发表于2020-02-01 09:46 被阅读0次

Ubuntu默认源在国外,可以将默认源修改为国内的阿里源,以提升更新速度。

一、在 "/etc/apt/sources.list" 文件头部添加:

#添加阿里源
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

二、执行如下命令更新源:

sudo apt-get update
sudo apt-get upgrade

三、其他几个国内备选源:

#中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

#网易源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

另外,对于新安装的系统,基本上都会遇到如下的错误:

E: Failed to fetch cdrom://Ubuntu-Server 16.04.3 LTS Xenial Xerus - Release amd64 (20170801)/dists/xenial/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs E: Some index files failed to download. They have been ignored, or old ones used instead.

在 "/etc/apt/sources.list" 文件中注释掉这一行:

deb cdrom:[Ubuntu-Server 16.04.3 LTS _Xenial Xerus_ - Release amd64 (20170801)]/ xenial main restricted

Ubuntu

相关文章

  • Ubuntu 18.04修改默认源为国内源

    安装Ubuntu18.04后,使用国外源太慢了,修改为国内源会快很多。 修改阿里源为Ubuntu 18.04默认的...

  • 将 Ubuntu 默认源修改为国内源

    Ubuntu默认源在国外,可以将默认源修改为国内的阿里源,以提升更新速度。 一、在 "/etc/apt/sourc...

  • Ubuntu 18.04 国内源

    18.04后,使用国外源太慢了,修改为国内源会快很多。 修改阿里源为Ubuntu 18.04默认的源 备份/etc...

  • ubuntu基础配置(慢慢更新)

    壹.更换国内源: 安装Ubuntu后,使用国外源速度很慢,修改为国内源会快很多,修改阿里源为Ubuntu 18.0...

  • 解决pip install 下载慢

    更改pip源即可,修改为pip国内源: 新版ubuntu要求使用https源,要注意。 清华:https://py...

  • 2018-11-05

    Ubuntu 18.10更换为国内源 个人分类: Linux 安装Ubuntu 18.10后,使用国外源太慢了,修...

  • Ubuntu 源

    Ubuntu ARM更改为国内源

  • Ubuntu 18.04 软件源修改为国内源

    国内有很多 Ubuntu 的镜像源,包括阿里的、网易的,还有很多教育网的源,比如:清华源、中科大源。我们这里以清华...

  • Traceback (most recent call last

    python3设置默认源时报错 输入命令 将 改为

  • Ubuntu 更改为国内源

    此处都以阿里云的镜像为例子;Ubuntu分为ARM版本和x86版本 阿里云镜像网站:https://opsx.al...

网友评论

      本文标题:将 Ubuntu 默认源修改为国内源

      本文链接:https://www.haomeiwen.com/subject/kgutxhtx.html