首先查看自己的版本号,是否为最新版
lsb_release -a ///查看kali版本和内核版本
要更新源要先打开储存源的文件sources.list
leafpad /etc/apt/sources.list ///打开源文件
将源复制到文件里,在这里遇到安装了vmtools但不能和主机互通的问题,不能复制粘贴,找到解决方法是安装Open-VM-tools
apt-get install open-vm-tools-desktop fuse ///安装Open-VM-tools
reboot ///重启
vmtools问题解决,继续解决源的问题,重新打开源文件把源复制进去,挑两个就行了,比如我用的中科大和阿里云的镜像文件,速度挺快的
#中科大
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
#阿里云
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
#清华大学
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
#浙大
deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
#东软大学
deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
#官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
保存后要先更新源
apt-get update ///更新源
开始更新系统和升级软件
apt-get upgrade ///更新系统
apt-get dist-upgrade ///更新软件
清理残余文件并重启
apt-get clean ///清理残余文件
reboot ///重启