其他分享
首页 > 其他分享> > kali 更换国内源

kali 更换国内源

作者:互联网

打开source源

vim /etc/apt/sources.list

sousrce


没有权限进行更改 获取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 提示: 加'!'强制执行,但是未保存文件


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’ 来查看它们。

正确姿势

标签:etc,kali,list,apt,国内,sources,交换文件,更换
来源: https://www.cnblogs.com/depressiom/p/15987087.html