Ubuntu 20.04 server登入後,出現提示訊息:
- 97 updates can be applied immediately.
- 15 of these updates are standard security updates.
- ......
- *** System restart required ***
出現上面的訊息,代表著更新的套件有些需要重新開機才能夠作用,這些套件列在/var/run/reboot-required.pkgs裡面。若僅要確認更新standard security updates套件後是否要重開機,那就用指令:
- grep --color -f <(apt-get -s dist-upgrade | grep "^Inst" | grep -i security | awk -F " " {'print $2'}) /var/run/reboot-required.pkgs