ubuntu修改默认的apt源

ubuntu修改默认的apt源

1、备份原来的文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2、修改source.list 文件

sudo vim /etc/apt/sources.list

3、将原来的文件修改成以下内容(阿里云镜像)

deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main
 
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main
 
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
 
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

4、更新apt

sudo apt-get update

 

ubuntu修改默认的apt源

上一篇:LINUX服务器常用命令


下一篇:Linux下make对软件的安装和卸载