How to upgrade kernel to latest version on Ubuntu 21.04

First download the bash script utility from the github by using "wget" command.



root@vps:~# wget
--2021-05-01 13:54:46--
Resolving (,,, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26474 (26K) [text/plain]
Saving to: ‘’

ubuntu-mainline-ker 100%[===================>]  25.85K  --.-KB/s    in 0.001s

2021-05-01 13:54:47 (45.3 MB/s) - ‘’ saved [26474/26474]

Install the previously downloaded script into our executable path with following command.

install /usr/local/bin/

Next, Run the downloaded script to upgrade the Ubuntu kernel to the latest version. During the time of installation it'll ask you permission to install latest kernel version press "Y" to continue. -i


root@vps:~# -i
Finding latest version available on
Latest version is: v5.12.0, continue? (y/N)
Will download 6 files from
Downloading amd64/linux-headers-5.12.0-051200-generic_5.12.0-051200.202104252130_amd64.deb: 100%
Downloading amd64/linux-headers-5.12.0-051200_5.12.0-051200.202104252130_all.deb: 100%
Downloading amd64/linux-image-unsigned-5.12.0-051200-generic_5.12.0-051200.202104252130_amd64.deb: 100%
Downloading amd64/linux-modules-5.12.0-051200-generic_5.12.0-051200.202104252130_amd64.deb: 100%
Downloading amd64/CHECKSUMS: 100%
Downloading amd64/CHECKSUMS.gpg: 100%
Importing kernel-ppa gpg key ok
Signature of checksum file has been successfully verified
Checksums of deb files have been successfully verified with sha256sum
Installing 4 packages
Cleaning up work folder

Once upgrade command is over reboot your Ubuntu system and check for the loaded Kernel version.

uname -rs


root@vps:~# uname -rs
Linux 5.12.0-051200-generic