Ubuntu更换国内源

Posted 潇湘梦白

tags:

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

1.备份原来的源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.更换源

 sudo getdit /etc/apt/sources.list

阿里源(复制以下内容,替换原内容)

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse 
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse 


3.更新源

sudo apt-get update

更新软件

sudo apt-get upgrade

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

Ubuntu更换国内源

ubuntu apt 更换为国内的源

ubuntu20.04 LTS 更换国内163源、阿里源、清华源、中科大源

Ubuntu 18.04桌面可视化更换国内源!!!(图文并茂详细版!!!)

ubuntu 16.04 更换国内源(下载源)(阿里源)

Ubuntu更换国内源