Hostwinds Tutorials

Search results for:


Table of Contents


How Do I Update My Linux Server?
Centos/RedHat
Ubuntu/Debian

How To Update Your Server (Linux)

Tags: Cloud Servers,  Linux 

How Do I Update My Linux Server?
Centos/RedHat
Ubuntu/Debian

How Do I Update My Linux Server?

You can update your server by logging into the server and calling the update function of the package manager that your Linux distro uses. This process can vary from Linux distro to Linux distro. However, the following applies to the most popular Linux distros that we offer at this time.

The following steps require you to be logged into the server as the root user via SSH.

Centos/RedHat

To update your Red Hat-based distro, use the following command while logged into the server via SSH.

yum update

Please note that this will prompt you to confirm the package installations that occur during the update process by asking you to press 'y'. If you'd like to avoid this, you may use the aforementioned command with the -y option. The command would be as follows.

yum update -y

Ubuntu/Debian

To update your Debian or Ubuntu-based distribution, execute the following command while logged into the server via SSH.

apt-get update && apt-get dist-upgrade

These are actually two commands:

apt-get update
apt-get dist-upgrade

The "&&" means that the first command will be executed. The second. apt-get update will refresh the repository, and an apt-get upgrade will upgrade all packages it can and intelligently handles dependencies.

Please note that this will prompt you to confirm the package installations that occur during the update process by asking you to press 'y'. If you'd like to avoid this, you may use the aforementioned command with the -y option. The command would be as follows.

apt-get update && apt-get dist-upgrade -y

This will update all packages on the server to their most stable and supported releases. Please note that this process can take some time to complete, and it is recommended to let the update process run to completion. Some packages that were installed may also require a reboot for the process to resolve completely.

Written by Michael Brower  /  December 13, 2016