Keeping your operating systems up to date with the latest software and security patches is one of the easiest methods to improve security. As a result, deploying updates regularly is a vital aspect of keeping systems secure. However, many users don’t know about the updates, and their system gets old as compared to the latest security patches. So in this blog, we will explain the method to install security patches or updates automatically on Rocky or AlmaLinux.
Install Security Patches or Updates Automatically on AlmaLinux 8 or Rocky Linux
Step 1: First of all, open the terminal execute the following command to keep your system up-to-date:
sudo dnf check-update or sudo dnf update -y
Step 2: After that, use the following command to update the EPEL repository (Extra Packages for Enterprise Linux):
sudo dnf install epel-release -y
Step 3: Now, we can automate the security patches update by executing the below command:
sudo dnf install dnf-automatic
Step 4: By running the following command, you can verify the dnf-automatic after successful installation.
rpm -qi dnf-automatic
As you can see in the above image, the package manager has an “automated upgrades” privilege.
Step 5: For updating and enabling dnf-automatic service, use the below-given command:
sudo systemctl enable --now dnf-automatic.timer
If you want to check the status of the automatic update process, then use this command:
sudo systemctl list-timers *dnf-*
Conclusion
To safeguard your systems from harmful attacks, you must apply security upgrades. Installing software updates is also vital in the long run, not just to gain access to new features but also to stay secure against security flaws detected in outdated programs. Furthermore, it is in your best interest to install all additional updates that may make your machine vulnerable to attack.