为KALI进行更新
由于kali的软件仓库在国外,更新很慢,我们需要将kali的软件源更换为国内的软件源,推荐中科大的源
编辑 /etc/apt/sources.list 文件, 在文件最前面添加以下条目:
deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
更改完 sources.list 文件后请运行 sudo apt-get update 更新索引以生效。
我们已经配置了ssh可以直接通过ssh进行更换
vim /etc/apt/sources.list
按i键进入编辑模式,在文件的最前面粘贴
deb https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src https://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
即可
按esc退出编辑模式,按:wq保存退出
接下来输入
apt update
更新源
┌──(root㉿192)-[~]
└─# apt update
Get:1 https://mirrors.ustc.edu.cn/kali kali-rolling InRelease [30.6 kB]
Get:2 https://mirrors.ustc.edu.cn/kali kali-rolling/main Sources [14.7 MB]
Get:4 https://mirrors.ustc.edu.cn/kali kali-rolling/non-free Sources [129 kB]
Get:5 https://mirrors.ustc.edu.cn/kali kali-rolling/contrib Sources [70.9 kB]
Get:6 https://mirrors.ustc.edu.cn/kali kali-rolling/main amd64 Packages [18.3 MB]
Get:3 http://kali.download/kali kali-rolling InRelease [30.6 kB]
Get:7 http://kali.download/kali kali-rolling/main amd64 Packages [18.3 MB]
Get:8 https://mirrors.ustc.edu.cn/kali kali-rolling/main amd64 Contents (deb) [42.5 MB]
Get:9 http://kali.download/kali kali-rolling/main amd64 Contents (deb) [42.5 MB]
Get:10 http://kali.download/kali kali-rolling/contrib amd64 Packages [108 kB]
Get:11 http://kali.download/kali kali-rolling/contrib amd64 Contents (deb) [155 kB]
Get:12 http://kali.download/kali kali-rolling/non-free amd64 Packages [224 kB]
Get:13 http://kali.download/kali kali-rolling/non-free amd64 Contents (deb) [952 kB]
Get:14 https://mirrors.ustc.edu.cn/kali kali-rolling/non-free amd64 Packages [224 kB]
Get:15 https://mirrors.ustc.edu.cn/kali kali-rolling/non-free amd64 Contents (deb) [952 kB]
Get:16 https://mirrors.ustc.edu.cn/kali kali-rolling/contrib amd64 Packages [108 kB]
Get:17 https://mirrors.ustc.edu.cn/kali kali-rolling/contrib amd64 Contents (deb) [155 kB]
Fetched 139 MB in 30s (4,669 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
228 packages can be upgraded. Run 'apt list --upgradable' to see them.
接下来输入
apt upgrade
进行更新会更新全部的软件以及系统。
在这里他会询问你是否要进行更新输入y回车即可