如何确定是否需要重新启动Ubuntu升级?

当我使用apt来更新我的系统时(例如运行sudo aptitude full-upgrade),它有时会安装需要重新启动的更新.这适用于esp.用于内核(安全)更新.

我有时可以在ssh登录消息中看到这个.我想知道如何(否则)我可以确定系统是否需要重新启动由于这些更新.

MOTD“需要重启”文本由/usr/lib / update-notifier / update-motd-reboot-required生成,它检查/ var / run / reboot-required是否存在并从中拉出文本:
#!/bin/sh -e
#
# helper for update-motd

if [ -f /var/run/reboot-required ]; then
        cat /var/run/reboot-required
fi

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...