Skip to content

How to upgrade your instance to the latest kernel

Estimated time to read: 2 minutes

In this tutorial, we will show you how you can upgrade the kernel of your instance (cloud server). There are two ways to upgrade your instance to the latest kernel version. You can upgrade all available packages of your instance that will automatically give you the latest stable kernel if available or you can update only the kernel without modifying other packages on your instance.

Prerequisites

For this tutorial you'll need the following:

  1. A Fuga Cloud account
  2. A Linux machine (either an instance on OpenStack or your local workstation) capable of running Ansible.
  3. Running Linux instance(s)
  4. SSH access to that instance(s)

Step 1: Log in to your instance

og in via the terminal to your instance using SSH

ssh ubuntu@instance_ip

For a complete description on how you can log in to your instance click here.

Step 2: Upgrade your kernel

The commands needed to update your kernel depend on the operation system of your instance.

If you’re running Ubuntu and you want to upgrade all packages you can run the following commands:

sudo apt-get update
sudo apt-get dist-upgrade

If you’re running Ubuntu and you want to upgrade only the kernel you can run the following commands:

sudo apt-get update
sudo apt-get install linux-virtual

If you’re running Debian and you want to upgrade all packages you can run the following commands:

sudo apt-get update
sudo apt-get dist-upgrade

If you’re running Debian and you want to upgrade only the kernel you can run the following commands:

sudo apt-get update
sudo apt-get install linux-image-amd64 linux-headers-amd64

If you’re running CentOS and you want to upgrade all packages you can run the following commands:

sudo yum update

If you’re running CentOS and you want to upgrade only the kernel you can run the following commands:

sudo yum update kernel

If you’re running Fedora and you want to upgrade all packages you can run the following commands:

sudo dnf update

If you’re running Fedora and you want to upgrade only the kernel you can run the following commands:

sudo dnf update kernel

Step 3: Restart your instance

To restart your instance from the command line run the following command:

sudo shutdown -r now

Conclusion

You have now learned how you can upgrade the kernel of your instance to the latest available version.