sudo apt update # following packages are used to build kernel, you may need more sudo apt install build-essential libncurses5-dev git flex bison wget bzip2 # following packages are used to build kernel package sudo apt install kernel-package fakeroot
cd linux-kernel make clean && make mrproper # if you want to use default config make x86_64_defconfig # or use local machine config cp /boot/config-`uname -r` ./.config # configure anything you want make menuconfig