Categories: CentOSLinuxShell

How to keep Rocky Linux 8 up to date

As a system administrator, it is your job to keep the system up to date with the latest packages to increase system stability and reduce security risks. If you haven't configured your server to check for updates automatically, you'll have to update them manually.

In this tutorial, we'll learn how to keep Rocky Linux 8 Server up to date. So, let's get started.

Manual Rocky Linux update using dnf

To check if there is any update available for your installed packages, navigate to the terminal and type the following command.

# sudo dnf check-update

If there is any update available, it will list down the updated available packages, update the single package, and use the following command.

# sudo dnf update httpd

To update the system development tools, use the following command.

# sudo dnf update "Development Tools"

To update all of your system packages at a time, execute the following command.

# sudo dnf update

It’s a good practice to keep your software packages updated with the latest version to minimize the security risk.

Automatic Rocky Linux updates with dnf

It’s a difficult task for a system admin to check system updates manually daily, when you have a large number of Infrastructure you won’t be able to check one by one. To set the system updates automatically, install the following package using the following command.

# sudo dnf install dnf-automatic

The Next step is to configure the automatic update, for this navigate to the dnf-automatic configuration file located at /etc/dnf/automatic.conf, and set the values for update.

# sudo vim /etc/dnf/automatic.conf

Set the download_updates and apply_updates parameters to YES, so every time the new updates come, it will install and notify through an email.

To set up an email notification, set the email_from and email_to parameters so it will notify you about the latest updates.

Conclusion

In this tutorial, we learned how to update a Rocky Linux 8 server with the latest software packages to reduce the security risk using automatically and manually.

Vitux Staff

Recent Posts

How to Install Magento 2 on AlmaLinux

Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…

1 year ago

How to Install ISPConfig Hosting Control Panel with Apache Web Server on Ubuntu 24.04

ISPConfig is an open-source control panel that allows users to manage multiple servers from a…

1 year ago

How to Test your Email Server (SMTP) Using the Telnet Command

As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…

1 year ago

Managing Network Interfaces and Settings on Ubuntu 24.04 with nmcli

Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…

2 years ago

Using Restic Backup on Ubuntu 24.04

Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…

2 years ago

Installing phpMyAdmin on Rocky Linux 9 and Securing it with Let’s Encrypt SSL

phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…

2 years ago