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更换国内源

上一篇:linux mongo数据丢失排查


下一篇:Linux错误 DataNode起不来