Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

Building a Linux Kernel

  • Print
  • + Share This
Hardware and security issues sometimes make compiling your own Linux kernel a necessity. Learn how to overcome the challenges and build the kernel you need with this beginner's guide.
Like this article? We recommend

Like this article? We recommend


The kernel that came with your Linux distribution was likely built as a "one size fits all" component of the operating system. In many situations, this generic kernel will be adequate for your needs. But building your own kernel offers several advantages:

  • Because you can read all of the source code, you know exactly what's compiled into your kernel. If a machine's kernel contains malicious code, you can count on someone exploiting it; this is why shops such as the U.S. Department of Defense require the kernel to be built in-house for all their systems.

  • Another advantage is hardware support. If your distribution's default kernel doesn't support some piece of esoteric hardware (say, the latest gigabit Ethernet interface or FireWire card), building a custom kernel can be an excellent solution.

  • Finally, building your own kernel can offer performance advantages. For example, you can build a kernel that supports only the hardware you have installed—nothing more. This technique can shrink the size of the kernel by a fair amount.

Once you've built your own kernel, you can even package it up and use it for all your systems. Knowing how to compile your own kernel is definitely a valuable skill for anyone who administers a Linux system.

  • + Share This
  • 🔖 Save To Your Account