在 /etc/apt/sources.list 里原来的内容全部删除,改为:
deb https://http.kali.org/kali kali-rolling main non-free contrib
deb-src https://http.kali.org/kali kali-rolling main non-free contrib
# apt update
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://mirrors.neusoft.edu.cn/kali kali-rolling InRelease
Reading package lists… Done
Building dependency tree
Reading state information… Done
879 packages can be upgraded. Run ‘apt list –upgradable’ to see them.
以下命令查看可以升级的所有安装包:
apt list –upgradable
现在我们有两个选择,如果安装固定包,执行:apt install PACKAGE-NAME
如果安装所有,执行 apt upgrade
#apt upgrade
这个命令需要执行很长时间,大约需要30分钟后升级完成。
中途有2个问题需要回答,有些服务需要重启,按yes不再提示,直接重启:
There are services installed on your system which need to be restarted when certain libraries, such as libpam, libc, and libssl, are
upgraded. Since these restarts may cause interruptions of service for the system, you will normally be prompted on each upgrade for the list
of services you wish to restart. You can choose this option to avoid being prompted; instead, all necessary restarts will be done for you
automatically so you can avoid being asked questions on each library upgrade.
Restart services during package upgrades without asking? [yes/no]
另外还有一个irc帐号的提示,需要改变用户目录:
Change the home directory of user “irc” from /var/run/ircd to /run/ircd
If you allow this change, a backup of modified files will be made with the extension .org, which you can use if necessary to restore the
current settings. If you do not make this change now, you can make it later with the update-passwd utility.
Do you want to change the home directory of user irc? [yes/no]
敲入yes继续吧。
由于软件包相关性的更改,某些Kali Linux软件包可能会保留下来。
这种情况下,在Kali Linux升级过程结束时,apt upgrade Linux命令将通知您可以使用 apt install PACKAGE-NAME 命令分别升级每个保留的软件包。
也可以一次更新所有保留的软件包:apt dist-upgrade
卸载不再需要的软件包
在初始系统升级期间,某些软件包可能会过时,因此不再需要。要删除所有不再需要的Kali Linux软件包,请执行:
apt autoremove