Update Fedora Linux using terminal for latest software patches

I recently switched from Windows server to Fedora 28 server running in the cloud. How do I apply software updates and patches on Fedora 28 server using the terminal application?

Fedora Linux uses dnf command. It is the next upcoming major version of yum command. Yum is a package manager for RPM-based Linux distributions such as CentOS/RHEL 7.x and older version of Fedora Linux. You need to use the dnf command to update Fedora Linux using terminal for latest software patches.

ADVERTISEMENTS

Procedure to update Fedora Linux using terminal for latest software

Let us see all commands in details to update Fedora Linux using terminal to get latest software patches.

Step 1. Open the terminal application

Open the terminal application. At the bash shell prompt type the following command to login into remote server:
$ ssh vivek@fedora28-nixcraft-cloud

Step 2. Update Fedora Linux using the terminal dnf command

Type the following dnf command and sudo command:
sudo dnf update
How to update Fedora Linux using terminal for latest software

Step 3. Note down the Fedora Linux kernel version

Type the following command to find our the Linux kernel version:
uname -mrs
Sample outputs:

Linux 4.16.3-301.fc28.x86_64 x86_64

Step 4. Reboot the Fedora Linux box

Type the following command to reboot the Fedora Linux server/desktop:
sudo reboot
OR
sudo shutdown -r now
Sample outputs:

Connection to 192.168.122.156 closed by remote host.
Connection to 192.168.122.156 closed.

Step 5. Verify new Fedora Linux kernel

Type the following command after ssh into your Fedora Linux cloud server/desktop:
ssh vivek@fedora28-nixcraft-cloud
uname -mrs

Sample outputs:

Linux 4.16.9-300.fc28.x86_64 x86_64

Step 6. Learning more about the dnf command to update Fedora Linux software

The dnf command also acts as a package manager for Fedora Linux. You can install new software, remove existing software, update specific software, list installed patches and more. Here are some command examples:

How to install new software called htop on Fedora Linux

sudo dnf install htop

Delete/erase an existing software called htop on Fedora Linux

sudo dnf remove htop

List all installed software

sudo dnf list installed| more
To learn more about the dnf command, type the following man command or read the official docs here:
$ man dnf

Conclusion

And there you have it. I updated Fedora Linux using terminal to get latest software patches.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
0 comments… add one

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.