Ubuntu18.0.4 apt换源

Posted 原则

tags:

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

#打开配置文件
sudo vim /etc/apt/sources.list
sudo gedit /etc/apt/sources.list

#替换里面的内容   可先备份sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
#最后更新
sudo apt-get update

 

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

Linux(Ubuntu)换apt-get源

如何用python写一个Ubuntu的换源程序(用到os.system)

Ubuntu16.04 换阿里源

ubuntu基础配置

ubuntu 换国内最快源

Ubuntu 20.04换阿里源