ubuntu16.04更换清华源

1 备份原来的更新源

cp /etc/apt/sources.list /etc/apt/sources.list.backup

 

 

2 修改更新源 

打开sources.list (这就是存放更新源的文件)

gedit /etc/apt/sources.list

将下面所有内容复制,粘贴并覆盖sources.list文件中的所有内容 

ubuntu16.04更换清华源
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
ubuntu16.04更换清华源

3 让更新源生效

sudo apt-get update

更新软件

sudo apt-get upgrade

 

ubuntu16.04更换清华源

上一篇:Linux的cut命令


下一篇:C#面向对象的概念