Updating a VPS 2


Introduction to updating a VPS

The purpose of this post is discuss how to connect to a remote Linux system via terminal for updating the system. Specifically, for a VPS (Virtual Private Server). This will allow you to issue commands without the need of a graphic interface.

Virtual Private Servers simulate an actual server environment on a hardware node. A VPS is less expensive than a hardware node, because each hardware node can run many instances of a VPS.

If you are interested in leasing a VPS, I would recommend Linode. I’ve experimented with many different VPS nodes, but I’ve found Linode to be the most reliable for the price (in my case). Please click this link to try out your own Linode!

If you are already using a Linux system at home, you will just need your terminal. If you are using Windows, you can download PUTTY after you’ve signed up for your VPS.

In PUTTY, you can connect to your Linode by using either the IP Address, or the hostname. If you choose to use a hostname, you can sign up for one at Godaddy. Be sure to point the “A” Record to the IP address of your Linode.

Connecting to your Linode from PUTTY.

In the opening screen of PUTTY, enter your hosname or IP address as shown. The default port is 22. Then, click “Open”.

Open PUTTY

Next, enter your login information:

Congratulations! you are now connected to your server via console!

If you decided to deploy Fedora or CentOS on your server, you can just type “yum update” to get your updates (or “dnf update”) on newer versions. If you have a debian distribution, you can type “apt-get update” then apt-get dist-upgrade” to get your updates for the server.

Some other basic commands that are useful are CD, LS, and VI. CD allows you to change the directory. This is similar to double clicking a folder in a graphical interface. LS will list the contents of the directory that you are in. VI is a good text editor that is pretty much standard with any linux distribution. Some prefer Nano as a text editor as it is more graphical than VI.

If you have not created a Linode yet, click this link as a guide!

— Ricky Bryce


Leave a comment

Your email address will not be published. Required fields are marked *

2 thoughts on “Updating a VPS

  • Oluwadamilare

    I actually deployed an instance in AWS, but I later realise that it’s quite different from other webhost. I wanted to edit my host name and used nano command, but it said it can’t be edited.
    I also wanted to update my server with “apt-get update” but it’s not working.
    Can you be of help please

    • Ricky Post author

      Are you trying to update the host as super user (sudo)? Also, is this a Debian based distribution that you installed? The update commands are different for various flavors of Linux. For example, if it’s Red Hat or CentOS, then you would use “dnf update” as root. For older versions of RedHat based OS’s, it was “yum update”. To edit your host name, you would probably need to do that as super user (or root) as well. You can either reboot after changing the hostname, or just type “hostname myhostname”. In either case, if it’s a permanent change, you will want to edit the host file. I’m assuming nano is installed already. — Ricky Bryce