How to Enable Automatic Software Updates on CentOS 8

How to Enable Automatic Software Updates on CentOS 8

Set up or enable automatic software updates on CentOS 8; Through this tutorial, we will learn how to enable or setup automatic software updates on centOS 8.

How to Enable Automatic Software Updates on CentOS 8

Just follow the following steps to enable or set up automatic software updates on centOS 8:

  • Step 1- Install dnf-automatic RPM Library
  • Step 2 – Configure dnf-automatic updates
  • Step 3 – Enable dnf-automatic

Step 1- Install dnf-automatic RPM Library

First of all, open terminal and execute the following command into it to install dnf automatic RPM libraries in centOS 8:

sudo dnf install -y vim dnf-automatic

To get more details on the library by executing the following command on termnal:

rpm -qi dnf-automatic

Step 2 – Configure dnf-automatic updates

To configuration file is /etc/dnf/automatic.conf, The configuration file is located at /etc/dnf/automatic.conf. Once we have opened the file, we can to set the required values to fit software requirements.

[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

To enable the feature, disable apply_updates in the configuration file.

apply_updates = no

Step 3 – Enable dnf-automatic

Once the above process has been finished, now execute the following command on terminal to enable dnf automatic updates:

sudo systemctl enable --now dnf-automatic.timer

To check the status of the dnf-automatic service, run the following.

systemctl list-timers *dnf-*

Conclusion

Through this tutorial, we have learned how to enable or set up automatic software updates on centOS 8.

Recommended CentOS Tutorials

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published. Required fields are marked *