将Kali Linux官方存储库添加到Sources.List
时间:2020-02-23 14:37:36 来源:igfitidea点击:
从ISO文件安装Kali Linux后,我们可能需要手动更新APT源。
使用官方的存储库列表。
本教程将向我们展示如何将Kali Linux APT存储库添加到Sources.List。
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中添加标准和源存储库。
确认它们已添加。
$cat /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