提问如何更新Kali Linux?

要更新 Kali,首先确保已/etc/apt/sources.list正确:

kali@kali:~$ cat /etc/apt/sources.list
# See https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/
deb http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware

# Additional line for source packages
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free non-free-firmware
kali@kali:~$

此軟件源為Kali Linux官方鏡像源,您也可以將其替換爲其他的鏡像源(根據您的地區而定)

编辑 /etc/apt/sources.list 文件,在文件最前面添加以下任一镜像源:

注:

编辑:I
完成编辑:ESC
退出编辑::wq

下面给出几组适合中国大陆的更新源:

  • 中科大
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 更新索引以生效。

警告:由于 Kali 仓库未使用 by-hash 机制,同步时的一致性无法保证。如果在同步时执行 apt update,可能会看到以下错误

E: 无法下载 https://mirrors.ustc.edu.cn/kali/dists/kali-rolling/main/source/Sources.gz 文件尺寸不符(14593053 != 14592993)。您使用的镜像正在同步中?

如果出现以上错误,则需等待同步完成后再执行 apt update

  • 清华源
deb https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main non-free contrib
# deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main non-free contrib
  • 阿里巴巴开源镜像站
#deb https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#deb-src https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
  • 华为云开源镜像
deb https://mirrors.huaweicloud.com/kali kali-rolling main non-free contrib
deb-src https://mirrors.huaweicloud.com/kali kali-rolling main non-free contrib
  • 浙江大学镜像站
deb https://mirrors.zju.edu.cn/kali kali-rolling main non-free contrib
#deb-src https://mirrors.zju.edu.cn/kali kali-rolling main non-free contrib

 

之后我们可以运行以下命令将系統升级到最新的版本:

kali@kali:~$ sudo apt update
kali@kali:~$
kali@kali:~$ sudo apt full-upgrade -y
kali@kali:~$

 

请登录后发表评论

    请登录后查看回复内容

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock