kali linux 升级命令行,如何升级Kali linux系统?

在 /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

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值