Important Notes
Warning: Manual kernel installs can become outdated
This guide installs Linux Kernel 5.10.253 manually. It is unlikely to receive automatic updates through Ubuntu's normal kernel packages, so you will need to check for newer versions yourself.
Manual kernel installs can also cause boot or hardware issues on some systems. Your current kernel is usually kept so you can switch back if needed, but use care, especially on UEFI systems.
Finally, it should be noted that this script will NOT automatically determine your system architecture, utilising only the amd64 packages for a 64bit system. ARM-type processors are not supported.
The Script
echo " " &&
echo "This script will attempt to install Linux Kernel 5.10.253 on this machine." &&
echo "Typically, your current version will be kept, and you will be able to ustilise it again later if Kernel 5.10 does not work." &&
echo " " &&
read -p "Press Enter to continue, or abort by pressing CTRL+C" nothing &&
echo " " &&
echo "Downloading Kernel 5.10.253 Packages" &&
echo "4 Files, ~85 MB to Download" &&
echo " " &&
echo "Creating Kernel Directory in Home folder" &&
echo " " &&
mkdir -p $HOME/howtoubuntu-kernel-5-10-253 &&
cd $HOME/howtoubuntu-kernel-5-10-253 &&
echo " " &&
echo "Downloading File 1 of 4, 11 MB" &&
echo " " &&
wget https://kernel.ubuntu.com/mainline/v5.10.253/amd64/linux-headers-5.10.253-0510253_5.10.253-0510253.202604181143_all.deb &&
echo " " &&
echo "Downloading File 2 of 4, 2.1 MB" &&
echo " " &&
wget https://kernel.ubuntu.com/mainline/v5.10.253/amd64/linux-headers-5.10.253-0510253-generic_5.10.253-0510253.202604181143_amd64.deb &&
echo " " &&
echo "Downloading File 3 of 4, 12 MB" &&
wget https://kernel.ubuntu.com/mainline/v5.10.253/amd64/linux-image-unsigned-5.10.253-0510253-generic_5.10.253-0510253.202604181143_amd64.deb &&
echo " " &&
echo "Downloading File 4 of 4, 60 MB" &&
wget https://kernel.ubuntu.com/mainline/v5.10.253/amd64/linux-modules-5.10.253-0510253-generic_5.10.253-0510253.202604181143_amd64.deb &&
echo " " &&
echo "Installing Kernel" &&
echo "This step will require you password." &&
echo "This is the last step you can safely cancel at." &&
echo "Use Ctrl+C to cancel." &&
echo " " &&
sudo dpkg -i *.deb &&
echo " " &&
echo "Installation Complete" &&
echo " " &&
read -p "Press Enter to Delete the Downloads, or CTRL+C to keep them." nothing &&
echo " " &&
sudo rm -rf $HOME/howtoubuntu-kernel-5-10-253