Ubuntu Linux Upgrade Linux Kernel Command

How do I upgrade my Linux kernel version under Ubuntu Linux version 7.04/7.10/12.04/14.04/16.04/18.04/20.04 LTS server?

ADVERTISEMENTS

Various Options Under Ubuntu Linux To Upgrade Linux Kernel

You can use any one of the following methods:

  1. Use command-line tools such as apt-get command or apt command
  2. GUI tool such as Synaptic
  3. Reboot less kernel patching – Automatic Linux kernel updates for Ubuntu 16.04, 18.04 and 20.04 LTS. Apply critical patches without rebooting and keep your systems secure and compliant using LivePatching.
  4. Install custom Linux kernel version by compiling it

Let us see all commands and examples in details to upgrade the Linux kernel.

apt-get command – Upgrade Linux Kernel

Open terminal and type the following commands:
$ sudo apt-get update
Now search kernel version:
$ $ apt-cache search linux-image

linux-image-5.4.0-1009-aws - Linux kernel image for version 5.4.0 on 64 bit x86 SMP
linux-image-5.4.0-1009-gcp - Signed kernel image GCP
linux-image-5.4.0-1009-kvm - Linux kernel image for version 5.4.0 on 64 bit x86 SMP
linux-image-5.4.0-1009-oracle - Signed kernel image oracle
linux-image-5.4.0-1010-azure - Signed kernel image azure
linux-image-5.4.0-26-generic - Signed kernel image generic
linux-image-5.4.0-26-lowlatency - Signed kernel image lowlatency
linux-image-5.6.0-1007-oem - Signed kernel image oem
linux-image-aws - Linux kernel image for Amazon Web Services (AWS) systems.
linux-image-azure - Linux kernel image for Azure systems.
linux-image-extra-virtual - Extra drivers for Virtual Linux kernel image
linux-image-extra-virtual-hwe-18.04 - Extra drivers for virtual Linux kernel image (dummy transitional package)
linux-image-extra-virtual-hwe-18.04-edge - Extra drivers for virtual Linux kernel image (dummy transitional package)
linux-image-extra-virtual-hwe-20.04 - Extra drivers for Virtual Linux kernel image
linux-image-gcp - Google Cloud Platform (GCP) Linux kernel image
linux-image-generic - Generic Linux kernel image
linux-image-generic-hwe-18.04 - Generic Linux kernel image (dummy transitional package)
linux-image-generic-hwe-18.04-edge - Generic Linux kernel image (dummy transitional package)
linux-image-generic-hwe-20.04 - Generic Linux kernel image
linux-image-gke - Google Container Engine (GKE) Linux kernel image

Now install kernel by explicitly specifying version number such as 5.4.0-1000-aws (this is for AWS EC2 cloud server):
$ sudo apt-get install linux-image-5.4.0-1009-aws
Replace xx.yy with kernel version number. Another option is to apply all patches in a single go as follows to install kernel updates:
$ sudo apt update
$ sudo apt upgrade

Reboot the Linux system using the reboot command/shutdown command:
$ sudo reboot
## OR ##
$ sudo shutdown -r now

GUI tools

This is recommended method for most user. Click on System > Administration > Update Manager > Click on Check button > Apply all updates including kernel.

Latest Ubuntu version kernel updates using GUI

Press the Superkey (Windows key) > Type updater:
Ubuntu software update GUI app
You will see the software updater box as follows. Click on the Install Now button:
Ubuntu Linux Upgrade Linux Kernel Command Using GUI
When a new Linux kernel installed, you will be prompted to reboot the system.

Apply critical Linux kernel patches without rebooting on Ubuntu

We can use Livepatch service that install fixes automatically, without restarting your system which is useful on servers:

  1. Fixes are applied automatically, without restarting your system
  2. Reduces downtime, keeping your Ubuntu LTS systems secure and compliant
  3. Included as part of all Ubuntu Advantage for Infrastructure support packages
  4. Free version supported for desktop user including up to 3 servers
Ubuntu Linux apply critical kernel patches without rebooting

Conclusion

You learned about the command line and GUI tools that one can use to patch and update Ubuntu Linux kernel.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
6 comments… add one
  • ramdhan Feb 26, 2009 @ 12:16

    i have ubuntu 8.10 linux but when i want to install redhat linux 5 than an error occur
    “timer not connected ‘nopic error’ ” so whan search on net than i get soluation is update my karnal now i have new karnal but i dont’ know how can i install my new karnal with ubauntu linux

  • silas Apr 16, 2011 @ 5:58

    when i try to upgrade my kernel i get the following errors:T5254:~$ apt-cache search kernel-image
    comedi-source – Comedi kernel module source
    T5254:~$ sudo apt-get install linux-image-2.6.37.6-generic
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    E: Unable to locate package linux-image-2.6.37.6-generic
    E: Couldn’t find any package by regex ‘linux-image-2.6.37.6-generic’

  • Chi77 Jun 22, 2011 @ 9:29

    Silas, do apt-cache search linux-image and pick the one from the returned list.

    • Silas Aug 4, 2011 @ 22:10

      Thanks for helping a Noon out.

  • Jerry Jul 1, 2011 @ 22:18

    I would like to upgrade my 2.6.10 kernel to something newer mainly because there was no driver support for my Claro modem until kernel 2.6.20, as i understand. My problem with apt-get is that it assumes you have an internet connection. I have tried to manually download the package using my Windows connection, and then pointing to that package on my local hard disk through /etc/apt/search.list. But when apt-get reads the package, the package apparently points back to more on-line files to use for information or something.

    Am i completely clueless as to how this is supposed to work? This seems almost as senseless as the Claro people telling me to download drivers from the web for my non-functioning modem.

  • Somename Aug 4, 2011 @ 10:40

    Jerry…

    dpkg -i /location/of/package.deb

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.