美文网首页
Ubuntu 18.04 软件源修改为国内源

Ubuntu 18.04 软件源修改为国内源

作者: 404d67ac8c12 | 来源:发表于2019-09-27 15:13 被阅读0次

国内有很多 Ubuntu 的镜像源,包括阿里的、网易的,还有很多教育网的源,比如:清华源、中科大源。我们这里以清华源为例讲解如何修改 Ubuntu 18.04 里面默认的源。

更新清华源

1、备份 sources.list

$ cd /etc/apt/
$ sudo cp ./sources.list ./sources.list.back

2、编辑 sources.list

$ sudo vi ./sources.list    # 删除里面原有部分,填入以下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src 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-src 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-src 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-src 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-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

3、修改完成后保存退出,然后执行以下命令

sudo apt update
sudo apt upgrade    # 更新系统,可以不执行

国内其它源

1、阿里源

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-proposed main restricted universe multiverse
deb-src 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-backports main restricted universe multiverse

2、中科大

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

3、163网易源

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
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

相关文章

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

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

  • Ubuntu 18.04 国内源

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

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

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

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

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

  • docker配置sqli-labs

    0x00 安装docker 环境:Ubuntu 18.04 把源换成国内源,看清是18.04的,不然会产生...

  • 解决pip install 下载慢

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

  • ubuntu apt-get 切换源

    切换源是个体力活,网上找到的源不少,试了好些其实都用不了。 参考文章:Ubuntu 18.04 LTS 更换国内源...

  • 2018-11-05

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

  • Ubuntu 源

    Ubuntu ARM更改为国内源

  • 解决sudo apt-get update报错

    一般更新这个报错就要去换用其他的源来解决。下面是源的链接! Ubuntu18.04更换国内源(阿里,网易,中科大,...

网友评论

      本文标题:Ubuntu 18.04 软件源修改为国内源

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