一、更换国内源

1.Debian

备份当前源:mv /etc/apt/sources.list /etc/apt/sources.list.bak
编辑更新源:vim /etc/apt/sources.list
按 “i” 进入插入模式,编辑完成按”ESC”退出编辑模式,输入”:wq”保存文件

1
2
3
4
5
6
7
8
9
#阿里云
deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib

Debian其他更新源:Debian GNU/Linux 换源

2.Ubuntu

备份当前源:mv /etc/apt/sources.list /etc/apt/sources.list.bak
编辑更新源:vim /etc/apt/sources.list
按 “i” 进入插入模式,编辑完成按”ESC”退出编辑模式,输入”:wq”保存文件

1
2
3
4
5
6
7
8
9
10
11
#阿里云
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

Ubuntu其他更新源:Ubuntu18.04更换国内源(阿里,网易,中科大,清华等源

3.Kali

备份当前源:mv /etc/apt/sources.list /etc/apt/sources.list.bak
编辑更新源:vim /etc/apt/sources.list
按 “i” 进入插入模式,编辑完成按”ESC”退出编辑模式,输入”:wq”保存文件
阿里云更新源:

1
2
3
4
#阿里云
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
Kali其他更新源:我与Kali-Linux:换源(更换国内源)

4.Centos

参考文章:Linux:centos7 更新源