How to Update and Upgrade Your Linux Kernel

How to Update and Upgrade Your Linux Kernel

What Do I Need?

  • A Dedicated or VPS Linux Server
  • CentOS/Ubuntu

What is your Linux kernel?

Your Linux kernel is not this thing from the movie ‘Hackers’:

How to Update and Upgrade Your Linux Kernel

I just thought I’d clear up that notion first. The next person who makes that comparison in discussion with me will see me immediately hack their ghost and change the shell. A clap back to whoever can tell me in the comments section what that is a reference to. Anyway, essentially, your Linux kernel is the main component of a Linux operating system and is the core interface between a computer’s hardware and its processes. It communicates between the two, managing resources as efficiently as possible.

Well, that’s what’s supposed to happen. Bad actors have a number of ways of subverting and hijacking that and that’s why it’s important to maintain updates regularly. The name ‘kernel’ is derived from the concept of it existing within the OS, like a seed or nut inside of a hard shell. It controls major functions of the hardware, whether it’s a phone, tablet, laptop, server, or similar computing device.

  1. Check your Current Kernel Version
  1. Using Terminal, access your server as the ‘root’ user.
  2. At the terminal window, type:
uname -sr

  1. You should see printed on screen your operating system version:
Linux 4.4.0-64 generic
  1. The first two digits, in this case, 4.4, are the overall kernel package release. The third digit is the version, and the fourth digit shows you the levels of patches and fixes.
  1. Update the Repositories
  1. Using Putty, get your terminal on:
sudo apt-get update

How to Update and Upgrade Your Linux Kernel

  1. The command refreshes your local software packages. You should make a note of the latest versions and updates. If there’s a newer version of the kernel available, the command will locate it and mark it for download and installation.
  1. Run the Upgrade
  1. While still in terminal, type:
sudo apt-get dist-upgrade
  1. The ‘dist-upgrade’ switch asks the operating system to handle any dependencies ‘intelligently’. For example, if a particular software package is dependent on another software package to run, this command will make sure that the second package is completely upgraded before upgrading the first one. This is one of the safest ways to upgrade your Linux kernel.
  1. Use the Operating System GUI to Force a Kernel Upgrade
  1. There are occasional instances in which a newer kernel has been released but not thoroughly tested with your version of the Linux operating system. For example, you might be running Ubuntu 17.10 (Artful Aardvark) and you know that Ubuntu 18.04 (Bionic Beaver) is available. Updating your kernel in this way requires a more substantial process. Time to concentrate.
  1. Backup Your Important Files
  1. Hopefully, you’ve already done this; however, just in case, get on it now. Seriously.
  1. Use the Software Updater
  1. Boot your computer up directly into your operating system.
  2. Launch the software updater by hitting the ‘super key’ or the ‘windows key’ and search for ‘Update Manager’. The update manager will inform you if you have any updates available.
  3. Click ‘Settings’.
  1. Configure the Software Updater
  1. Click the ‘Updates’ tab.
  2. Check the first three checkboxes, under ‘Install updates from:
Important security updates
Recommended updates
Unsupported updates

  1. At the bottom of the tab, locate the dropdown labeled ‘Notify me of a new version:’ Click the dropdown and select:
For long-term support versions
For any new version

  1. Select the former if you’re running a live server and want to stick with something tested and reliable with full support available. Select the later selection if you like experimenting with the latest and greatest and don’t mind if things are a little glitchy. Not recommended.
  2. Close this dialog window and then re-open it. If an upgrade is available this will now be shown.
  1. Force the Upgrade
  1. If for whatever reason the operating system doesn’t offer an upgrade, you can force it to do your bidding by opening your terminal and typing:
update-manager -d

How to Update and Upgrade Your Linux Kernel

  1. You should now see a dialog window showing the latest release notes for the new kernel and version of your operating system. If all is well, click ‘Upgrade’ and the process will proceed.

Next Steps

Reboot your server and enjoy the knowledge that you’ve now got the latest, secure, kernel available for your server.

Conclusion

Watch out for another ‘how-to guide’ coming soon which will show how to complete a more advanced procedure that gives you even more granular control of your kernel upgrades and updates.

  • Check the recommendations for the best VPS and get a suitable one.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top