Ubuntu 18.04 更换apt源
Posted liujunjun
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 18.04 更换apt源相关的知识,希望对你有一定的参考价值。
1、备份apt源
cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、修改apt源
sudo gedit /etc/apt/sources.list
3、删除所有,添加阿里源
#添加阿里源 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 deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates 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、更新源
sudo apt update sudo apt upgrade
以上是关于Ubuntu 18.04 更换apt源的主要内容,如果未能解决你的问题,请参考以下文章
apt-get 软件源文件格式以及ubuntu 18.04更换阿里源
Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源)