One of the most effective ways to protect your servers is by updating them regularly. These updates and patches are released to fix security vulnerabilities, enhance performance and resolve issues.
The process of updating Ubuntu is fairly simple. All one needs is administrative access to the server terminal usually via SSH or other means.
Advanced Packaging Tool (APT) is a powerful command line tool which works with Ubuntu. It’s the default package management and installation tool for Ubuntu and other distributions.
Checking For Updates On Ubuntu Servers
To check for updated software that are available for Ubuntu server, run the commands below.
sudo apt-get update && apt-get -s upgrade
The command above will is all or any upgradable packages to choose from and give you the option to upgrade a single package or all the packages on the system.
Updating Ubuntu Packages
A single command s used to update all Ubuntu install packages. That command is shown below:
sudo apt-get update
You can also run the commands below to update as well as upgrade Ubuntu packages at the same time.
sudo apt-get update && sudo apt-get dist-upgrade
When you run the above commands, you’ll be prompted to confirm the update. You can then type Y for yes and press Enter to continue with the updates. Depending on the size of the update and your Internet connection speed, it may take few minutes to an hour.
After all the packages are downloaded and installed, you can continue working and knowing that you server is updated and protected.