Securing the system by keeping it up-to-date
This page has been converted from the Fedora Project Wiki and cleaned up for publishing here on the Fedora Docs Portal, but it has not yet been reviewed for technical accuracy. This means any information on this page may be outdated or inaccurate. Reviews for technical accuracy are greatly appreciated. If you want to help, see the README file in the source repository for instructions. |
This section explains:
-
Why it is important to update your system regularly (Why it is important to keep your system up-to-date)
-
How to apply updates manually by using GUI or CLI (Manual updating using CLI)
-
How to enable automatic updates (Setting automatic updates)
Why it is important to keep your system up-to-date
This section briefly explains the importance of updating your system on a regular basis.
All software contains bugs. Often, these bugs can result in a vulnerability that can expose your system to malicious users. Packages that have not been updated are a common cause of computer intrusions. Implement a plan for installing security patches in a timely manner to quickly eliminate discovered vulnerabilities, so they cannot be exploited.
Manual updating using GUI
This section describes how to manually download and install new updates by using GUI.
Procedure
-
Hover the cursor over the upper-left corner of the screen and type "Software" and select the Software application to open it.
-
Click the Updates button.
-
After the updates are downloaded click the Restart & Update button.
Manual updating using CLI
This section describes how to manually download and install new updates by using the DNF package manager.
Procedure
Use the following commands as the root
user or under the sudo
utility.
-
Upgrade the system:
# dnf upgrade
Confirm to download the available packages.
Additional Resources
-
The
dnf(8)
manual page
Setting automatic updates
This section describes how to use the DNF Automatic application to automatically:
-
Download and install any new updates
-
Only download the updates
-
Get notified about the updates
Procedure
Use the following commands as the root
user or under the sudo
utility.
-
Install the dnf-automatic package:
# dnf install dnf-automatic
-
Edit the
/etc/dnf/automatic.conf
configuration file as needed. See the DNF Automatic documentation for details. -
Enable and start the
systemd
timer:# systemctl enable timer # systemctl start timer
Replace
timer
with one of following ones depending on what action you want to do:-
dnf-automatic-install.timer
to download and install packages -
dnf-automatic-download.timer
to only download packages -
dnf-automatic-notifyonly.timer
to only get a notification using configured emitters in the/etc/dnf/automatic.dnf
file.
For example:
# systemctl enable dnf-automatic-install.timer Created symlink /etc/systemd/system/basic.target.wants/dnf-automatic-download.timer → /usr/lib/systemd/system/dnf-automatic-download.timer. # systemctl start dnf-automatic-install.timer
-
-
Ensure that the timer has been successfully enabled and started:
# systemctl status timer
Replace
timer
with the timer from the previous step, for example:# systemctl status dnf-automatic-install.timer ● dnf-automatic-download.timer - dnf-automatic-download timer Loaded: loaded (/usr/lib/systemd/system/dnf-automatic-download.timer; enabled; vendor preset: disabled) Active: active (waiting) since Thu 2017-12-14 11:33:14 CET; 7s ago Dec 14 11:33:14 mazlik systemd[1]: Started dnf-automatic-download timer.
Additional Resources
-
The DNF Automatic documentation
Additional Resources
-
The DNF chapter in the Fedora System Administrator’s Guide