Learn to safely and efficiently update your Ubuntu server using simple SSH commands. This guide is perfect for beginners and includes additional steps for updating PHP, Nginx, and Bind9 via the Sury repository.
Before diving into the update process, ensure you have SSH access to your Ubuntu server. SSH, or Secure Shell, is a network protocol that gives you the ability to securely access your server over an unsecured network. If you're not familiar with SSH, consider reading a quick guide on how to use it.
Updating your Ubuntu server is straightforward but requires attention to detail. The process involves refreshing your package list, upgrading packages, and then cleaning up. Here's how you do it:
ssh username@your_server_ip
.sudo apt update
to refresh your package list. This command fetches the latest versions of packages and their dependencies but doesn't install them.sudo apt upgrade
to install the new versions of the packages.sudo apt autoremove
to remove them.For more up-to-date versions of PHP, Nginx, and Bind9, you might want to use third-party repositories like packages.sury.org. Here's how to add the Sury repository to your Ubuntu server:
sudo apt install -y software-properties-common
.sudo add-apt-repository ppa:ondrej/php
.sudo apt update
.Keeping your Ubuntu server updated is crucial for security and performance. Here are some additional tips: