新用户在安装Kali_Linux之后一定要做的就是更新国内源,与系统自带的国外源相比,国内源节约了许多的时间,带来了更高的下载效率。

修改更新源,原理是修改系统中的“sources.list”文件,所以我们使用任意编辑器打开这个文件(可能需要su权限,非root用户请自带sudo)

vim /etc/apt/sources.list

在文件顶端添加这些源即可,可以删除系统的官方源,也可以直接添加,一个源一行(可以用大量换行以示区分),我建议使用阿里云的Kali源,因为经我测试阿里云的效率比较高,中科大也是速度较快的Kali源

#中科大 kali源

deb http://mirrors.ustc.edu.cn/kali sana main non-free contrib

deb http://mirrors.ustc.edu.cn/kali-security/ sana/updates main contrib non-free

deb-src http://mirrors.ustc.edu.cn/kali-security/ sana/updates main contrib non-free

#阿里云 kali源

deb http://mirrors.aliyun.com/kali sana main non-free contrib

deb http://mirrors.aliyun.com/kali-security/ sana/updates main contrib non-free

deb-src http://mirrors.aliyun.com/kali-security/ sana/updates main contrib non-free

下面放出所有的国内源

#官方源
deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free

#中科大 kali源
deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free

#新加坡 kali源
deb http://mirror.nus.edu.sg/kali/kali/ kali main non-free contrib
deb-src http://mirror.nus.edu.sg/kali/kali/ kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb http://mirror.nus.edu.sg/kali/kali-security kali/updates main contrib non-free
deb-src http://mirror.nus.edu.sg/kali/kali-security kali/updates main contrib non-free

#阿里云 kali源
deb http://mirrors.aliyun.com/kali kali main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali main non-free contrib
deb http://mirrors.aliyun.com/kali-security kali/updates main contrib non-free

#网易 Kali源
deb http://mirrors.163.com/debian wheezy main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy main non-free contrib 
deb http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian-security wheezy/updates main non-free contrib 
deb http://mirrors.163.com/debian-security wheezy/updates main non-free contrib


#上海交大 Kali源 (比较慢)
#deb http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
#deb-src http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib 
#deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib 
#deb-src http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib 
#deb http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib 
#deb-src http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib

最后,保存文件,即可使用新的国内源进行更新操作了

下面顺带写一下Kali_Linux更新代码(非root用户请自带sudo)

apt-get update & apt-get upgrade

apt-get dist-upgrade 

apt-get clean

全文完:)


Hope to be a free geek forever.