sudo apt-get install build-essential libncurses-dev bison flex libssl-dev libelf-dev #make sure you have plenty of room on you drive #get the kernel from http://kernel.org url="$(wget -qO- "https://www.kernel.org/"|grep tar|head -n 1|cut -d\" -f2)" wget "$url" -O linux.tar.xz tar -xJvf linux.tar.xz cd linux make clean && make mrproper cp /boot/config-`uname -r` ./.config make menuconfig #choose “LOAD” and “.config” then exit and save #This will take a while #make-kpkg clean #fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers make deb-pkg clean fakeroot make deb-pkg --initrd --append-to-version=-custom kernel_image kernel_headers #this creates two .deb files in the current dir #install them