March 17, 2023
If you operate a Linux server, or even a Linux home operating system, it's extremely important to keep your system and software updated to patch against vulnerabilities. The usual way of doing this is logging into the server via SSH and running some BASH commands:
To update your system on Ubuntu/Debian, you can use the apt command. First, open a terminal window and enter sudo apt update to refresh your package list. Then enter sudo apt upgrade to install any available updates.
For CentOS 7, you can use the yum command to check for and install updates. Open a terminal window and enter sudo yum check-update to see if there are any available updates. Then enter sudo yum update to install them. You can also enable automatic updates by installing and configuring yum-cron.
To update your system on CentOS Stream 8/9, you can use the dnf command. Open a terminal window and enter sudo dnf check-update to see if there are any available updates. Then enter sudo dnf update to install them.
For RHEL/Fedora, you can also use the dnf command to check for and install updates. Open a terminal window and enter sudo dnf check-update, then enter sudo dnf update to install any available updates. You can also use the Software Center on Fedora systems by clicking on notifications about available updates or opening it manually.
To update your system on openSUSE, you can use the zypper command. Open a terminal window and enter sudo zypper refresh to refresh your package list. Then enter sudo zypper update to install any available updates. You can also use YaST Software Management for updating an openSUSE Leap system.