1. 彈框沒截圖,是因為ubuntu22.04一個新特性導致的,由 needrestart 命令觸發,默認情況是交互性質的,也就是會中斷在這里需要手動要處理提示。
2. 修改/etc/needrestart/needrestart.conf 文件,將 #$nrconf{restart} = 'i'; 換為 l


?參數介紹:
# 自動重啟不提示的話,改為參數 a
$nrconf{restart} = 'a'; # 列出需要重啟的服務,改為英文字符l
$nrconf{restart} = 'l';