명령어/Linux

[RHEL] dnf-automatic 자동 보안 업데이트

jykim23 2026. 7. 16. 13:10
반응형

부제: systemd 타이머로 업데이트를 자동 다운로드·설치하는 도구

dnf-automatic --downloadupdates   # 다운로드만
dnf-automatic --installupdates    # 설치까지
systemctl enable --now dnf-automatic.timer   # 타이머 활성화
$ dnf-automatic --help
usage: dnf-automatic [-h] [--timer] [--installupdates] [--downloadupdates]
                     [--no-installupdates] [--no-downloadupdates]
                     [conf_path]

dnf-automatic은 /etc/dnf/automatic.conf 설정에 따라 업데이트를 주기적으로 확인·다운로드·설치하고 결과를 알려주는 도구다. 데비안의 unattended-upgrades에 해당한다. 동작은 dnf-automatic.timer systemd 타이머가 주기적으로 트리거한다. 설정 파일에서 알림만 받을지, 다운로드까지 할지, 설치까지 할지 정한다.

이렇게도 쓴다

타이머를 켜고 상태를 확인한다.

systemctl enable --now dnf-automatic.timer && systemctl status dnf-automatic.timer

 

다음 실행 예정 시각을 본다(타이머 조합).

systemctl list-timers dnf-automatic.timer

 

설치는 하지 않고 다운로드만 미리 받아둔다.

dnf-automatic --downloadupdates --no-installupdates

 

설정 파일에서 알림·설치 정책을 확인한다.

grep -E 'apply_updates|download_updates|emit_via' /etc/dnf/automatic.conf

 

타이머가 남긴 최근 실행 로그를 본다.

journalctl -u dnf-automatic.service --since today
반응형