从ISO文件安装Kali Linux之后,您可能需要使用正式的存储库列表手动更新APT sources.list文件,本文介绍如何把Kali Linux官方存储库加入到sources.list文件中。安装Kali可参考在虚拟机VMware下安装Kali Linux系统教程。
Apt需要软件存储库才能下载软件包并将其安装到计算机上,我正在Kali Linux 2019.4滚动发行版中进行此操作,因此,让我们开始吧: $ cat /etc/os-release PRETTY_NAME="Kali GNU/Linux Rolling" NAME="Kali GNU/Linux" ID=kali VERSION="2019.4" VERSION_ID="2019.4" VERSION_CODENAME="kali-rolling" ID_LIKE=debian ANSI_COLOR="1;31" HOME_URL="https://www.kali.org/" SUPPORT_URL="https://forums.kali.org/" BUG_REPORT_URL="https://bugs.kali.org/"
以root或用户身份登录到您的计算机并启动终端:
在终端中,检查系统中存在的apt存储库的当前列表: $ cat /etc/apt/sources.list
如果不存在APT存储库,请粘贴以下代码以添加它们: sudo tee -a /etc/apt/sources.list<<EOF 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 EOF
上面的命令将在/etc/apt/sources.list中添加标准和源存储库,确认已添加,如下内容: # # deb cdrom:[Debian GNU/Linux 2019.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20191125-10:47]/ kali-last-snapshot contrib main non-free #deb cdrom:[Debian GNU/Linux 2019.4 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20191125-10:47]/ kali-last-snapshot contrib main non-free # This system was installed using small removable media # (e.g. netinst, live or single CD). The matching "deb cdrom" # entries were disabled at the end of the installation process. # For information about how to configure apt package sources, # see the sources.list(5) manual. 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
更新您的软件包清单: $ sudo apt update Get:1 http://kali.download/kali kali-rolling InRelease [30.5 kB] Get:2 http://kali.download/kali kali-rolling/main Sources [12.8 MB] Get:3 http://kali.download/kali kali-rolling/non-free Sources [130 kB] Get:4 http://kali.download/kali kali-rolling/contrib Sources [60.1 kB] Get:5 http://kali.download/kali kali-rolling/main amd64 Packages [16.4 MB] Get:6 http://kali.download/kali kali-rolling/non-free amd64 Packages [196 kB] Get:7 http://kali.download/kali kali-rolling/contrib amd64 Packages [96.6 kB]Fetched 29.7 MB in 24s (1,237 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 597 packages can be upgraded. Run 'apt list --upgradable' to see them.
您可以选择进行系统升级: sudo apt -y upgrade sudo systemctl reboot
至此,全部完成了本文目的。
相关主题 |