Ubuntu18.04更换国内源

Posted blueheart0621

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu18.04更换国内源相关的知识,希望对你有一定的参考价值。

1. 备份原来的源文件 /etc/apt/sources.list

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bk

2. 新建文件 /etc/apt/sources.list

sudo vim /etc/apt/sources.list

3. 将国内源粘贴复制进去

  • 阿里源
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-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

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

4. 手动update一下

sudo apt update

以上是关于Ubuntu18.04更换国内源的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu18.04更换国内源

win10 linux Ubuntu 18.04更换国内源

系统篇: ubuntu 18.04 更换国内软件源

系统篇: ubuntu 18.04 更换国内软件源

系统篇: ubuntu 18.04 更换国内软件源

Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)