打开source源
vim /etc/apt/sources.list
没有权限进行更改 获取root 权限
按 i
提示内容:
E325: 注意
发现交换文件 "/var/tmp/sources.list.swp"
所有者: depressiom 日期: 三 3月 09 20:37:48 2022
文件名: /etc/apt/sources.list
修改过: 是
用户名: depressiom 主机名: depressiom
进程 ID: 1612
正在打开文件 "/etc/apt/sources.list"
日期: 三 3月 09 20:58:19 2022
比交换文件新!
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
如果是这样,请用 ":recover" 或 "vim -r /etc/apt/sources.list"
恢复修改的内容 (请见 ":help recovery")。
如果你已经进行了恢复,请删除交换文件 "/var/tmp/sources.list.swp"
以避免再看到此消息。
请按 ENTER 或其它命令继续
输入 :wq 提示: 加'!'强制执行,但是未保存文件
kali 源:
官方源
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 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
新加坡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
163 Kali源
deb http://mirrors.163.com/debian wheezy main non-free contrib
deb-src http://mirrors.163.com/debian wheezy main non-free contrib
0. sudo su - # 获取root 权限
1. vim /etc/apt/sources.list # 打开source.list
2. 输入 i 进行插入
3. ## 将自带的kali源 注释
4. 更换下面两个源:
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
5. 按esc键进入命令行模式 再输入 :wq # 保存 加'!' 强制执行
用apt update检验一下
请执行 ‘apt list --upgradable’ 来查看它们。
本文来自博客园,作者:depressiom,转载请注明原文链接:https://www.cnblogs.com/depressiom/p/15987087.html