Compiling the Linux kernel


How to build the Linux Kernel?

The Linux kernel is based on operating systems such as Unics. The kernel is responsible for communication between hardware and software and the allocation of sources. All Linux distributions are based on the cannon. But if you want to disable many options and drivers or try experimental patches, you need to build a Linux kernel.

The Linux kernel is the heart of any Linux system, and this controls the power on user input/output, hardware and computer. The kernel is usually sufficient to make your Linux distribution, which allows you to make it your specific kernel.

How to compile Linux Kernel in Ubuntu?

  • Use of Git: Use git to stay in sync with the latest Ubuntu kernel source. Detailed instructions can be found in the
  • Kernel Git Guide. The git repository does not include necessary control files, so you must build them by fakeroot Debian/rules clean
  • Download the source archive - This is for users who want to rebuild the standard Ubuntu packages with additional patches. Use the follow command to install the build dependencies and extract the source (to the current directory):
  • Install the following packages: sudo apt-get build-dep Linux-image-`uname -r`
  • Download the source package and build

This is for users who want to modify, or play around with, the Ubuntu-patched kernel source.

  1. Retrieve the latest kernel source from kernel.org.
  2. Extract the archive to a directory and cd into it:
  3. tar xf Linux-*.tar.xz

    cd Linux-*

  4. Build the ncurses configuration interface: make menuconfig
  5. To accept the default configuration, press → to highlight < Exit > and then Return.
  6. Press Return to save the configuration.
  7. Use make to build the kernel: