#在配置源之前,为了以防万一,可以打个快照或者备份一下源
1)输入vim /etc/apt/sources.list回车(如下图所示)
将原来的官方源用#注释掉变成蓝色,或者删除
2).复制国内镜像源进此文件
中科大源
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 https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free
清华大学源
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
以上几个源可以任意选择一个,如下图所示为成功
确保每一个源是以deb橙色开始>紫色>bullseye绿色>main橙色结尾
3)保存并退出
:wq——————————此为保存并退出命令,如保存不了,则使用:wq!强制保存退出
4)下载配置的源并验证是否成功
输入apt-get update
回车即可开始更新,如下图所示则为成功
5)特别提醒1
如果Done下面图还有这样的提示,请校对单引号里面的内容与正确的源。发现问题后请重新输入vim /etc/apt/sources.list回车
修正,并反复上述操作保存退出,重新下载,直到如图所示一致
6)特别提醒2
若您出现如下图所示网络质量不佳下载速度过慢,担心直接更换网络会出现问题,可以按下Ctrl+C终止此次下载,检查或切换网络后,重新输入下载命令apt-get update回车。