Skip to content

Instantly share code, notes, and snippets.

@DominikStyp
Last active November 26, 2023 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominikStyp/1ee16da7d649f6456d31eb6a5d0fc634 to your computer and use it in GitHub Desktop.
Save DominikStyp/1ee16da7d649f6456d31eb6a5d0fc634 to your computer and use it in GitHub Desktop.
Upgrade Linux Kernel + Headers:
#!/bin/bash
# first ensure the system is full updated
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
# first search the proper kernel
apt-cache search linux-image
# best way to install generic version of the kernel
sudo apt-get install linux-image-[VERSION]-generic
#After installing a new kernel, update GRUB (the bootloader) to recognize the new kernel
sudo update-grub
# reboot necessary
sudo reboot
# check the new version
uname -r
# install matching kernel headers
sudo apt-get install linux-headers-$(uname -r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment