How to Compile and Install Linux Kernel v4.9.11 Source On a Debian / Ubuntu Linux

How to Compile and Install Linux Kernel v4.9.11 Source On a Debian / Ubuntu Linux

To compile and install the Linux kernel v4.9.11 source on a Debian or Ubuntu system, follow these steps:

  1. Download the kernel source code from the kernel.org website:
refer to‮l:‬autturi.com
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.9.11.tar.xz
  1. Extract the downloaded archive:
tar -xf linux-4.9.11.tar.xz
  1. Change to the extracted directory:
cd linux-4.9.11
  1. Configure the kernel:
make menuconfig

This will open a menu-based configuration tool where you can select the options you want to include in the kernel.

  1. Compile the kernel:
make -j $(nproc)

This will build the kernel using all available CPU cores. The -j option specifies the number of parallel jobs to run, and nproc is a command that returns the number of CPU cores.

  1. Install the kernel:
sudo make modules_install
sudo make install

This will install the kernel modules and the kernel itself.

  1. Update the boot loader:
sudo update-grub

This will update the boot loader configuration to include the newly installed kernel.

Note: Compiling and installing a custom kernel can be a complex process, and it is generally recommended to use the kernel provided by the distribution. If you are not familiar with kernel compilation and configuration, it is recommended to use caution and seek additional guidance before proceeding.

Created Time:2017-10-28 21:38:57  Author:lautturi