在Debian系統中,實際上使用的是APT(Advanced Package Tool)作為其包管理工具,而不是YUM。YUM是Yellowdog Updater Modified的縮寫,主要用于基于RPM的Linux發行版,如Fedora、Red Hat Enterprise Linux(RHEL)及其衍生版。因此,關于Debian的包升級策略,應當使用APT相關的命令和步驟。以下是使用APT更新系統安全補丁的步驟:
sudo apt update
這個命令會同步你的系統與軟件倉庫的當前狀態,檢索所有可用更新。
sudo apt upgrade
該命令會比較本地已安裝的軟件包與軟件包列表中的版本,提示用戶進行升級操作。
sudo apt full-upgrade
此命令不僅會升級已安裝的軟件包,還會處理依賴關系,確保系統的一致性。
unattended-upgrades
包:sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure unattended-upgrades
安裝完成后,系統會提示是否啟用自動更新,選擇“是”并按回車鍵確認。
sudo systemctl status apt-daily.timer
sudo systemctl status apt-daily-upgrade.timer
如果需要修改定時器,可以使用以下命令啟用它們:
sudo systemctl enable --now apt-daily.timer
sudo systemctl enable --now apt-daily-upgrade.timer
。
以上步驟和注意事項適用于Debian及其衍生系統,如Ubuntu。不同版本的Debian可能會有細微的差別,但基本的更新流程是相似的。。