1.打开终端输入
sudo vim /etc/apt/sources.list
2.找到键盘上的开头是 lns键 点击 左下角就后出现“插入”
3.然后加入以下任意一种国源
#阿里云
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.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.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://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
4.输入完后
5.按Esc
6.再按Shinft + ;键
7.然后输入:wq! (保存退出)
8.如果你不小心哪里搞错但又不知道你可以输入:q! (强制退出不保存)
然后再输入
sudo apt update ;sudo apt upgrade -y ; sudo apt dist-upgrade -y