【Ubuntu】修改Ubuntu的apt-get源为国内镜像源

1、原文件备份

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

  

2、编辑源列表文件

sudo vim /etc/apt/sources.list

 

3、将原来的列表删除,添加如下内容(中科大镜像源)

:%d

清空原来

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

ctrl+ins

复制到虚拟机

:wq

写入后退出



4、更新

sudo apt-get update



【Ubuntu】修改Ubuntu的apt-get源为国内镜像源

上一篇:Linux学习笔记


下一篇:linux关闭防火墙