首先安裝自動更新的 dnf-automatic
dnf install dnf-automatic
設定組態檔
vi /etc/dnf/automatic.conf [commands] upgrade_type = default random_sleep = 0 download_updates = yes apply_updates = yes [emitters] emit_via = motd [email] email_from = [email protected] email_to = root email_host = localhost [base] debuglevel = 1
最後啟動
systemctl enable --now dnf-automatic.timer
檢查 dnf 自動服務的狀態
systemctl list-timers *dnf-*