UNDER CONSTRUCTION!!!

Tech News

Keeping You Up To Date With The Latest Tech News & Virus Threats
Font size: +

You Probably Don't Need to Compile a Linux Kernel Anymore

You Probably Don't Need to Compile a Linux Kernel Anymore

Key Takeaways

Custom Linux kernels are less common on modern systems due to improved generic kernels that work well with most hardware. Only specialized users like embedded system developers typically require custom kernels. Using a customized kernel may limit community support and compatibility with future updates.

Compiling a kernel used to be a rite of passage for many Linux users back in the '90s and early '00s. These days, it seems that hardly anyone does so anymore. Why is that?

What Is a Custom Kernel?

The Linux kernel is the heart of the system, handling almost all of the important functions, similar to other OSes. Microsoft Windows has a kernel, but a key difference from Windows is that you can make changes to the Linux kernel and recompile it, allowing you to redesign your own operating system.

You can choose the options you want in your kernel using a GUI-based or terminal-based menu system. While you don't have to be a developer, it helps to have some basic computer knowledge.

Linux kernel configuration menu in the Linux terminal.

Why would you want to do this? When Linux distributions were new, the kernel that came with the system was designed to run on a wide variety of hardware. This made sense when you just wanted to boot the installation program, but a "generic" kernel can be large since it has to run on so many systems. It made sense to build a new kernel on resource-constrained PCs of the day because it would be smaller and run faster, with less RAM usage than the default kernel.

It was also a common problem that the stock kernel might not support a piece of hardware you had, such as the video or sound card. Building a custom kernel would enable a driver for that hardware and let Linux take full advantage of your machine. On one installation of Slackware, the default kernel didn't include power management, so I had to turn off the power after shutdown using the power button, something I hadn't done since around 1998.

These days, custom kernels tend to be used by people doing specialized work, such as embedded system developers, because the kernels need to be as small as possible on these systems. Kernel developers build their kernels to test them. Enthusiast distros like Gentoo still have compiling a custom kernel as part of the installation process.

Your Distro's Kernel Is Probably Good Enough

Today, even PCs that are a few years old can run larger generic kernels without huge performance hits. This means it's more likely the stock kernel would work with your machine.

There isn't any reason for ordinary users to build their own kernels. If your hardware works with your distro, it's best to just use the standard kernel. The distro developers put so much effort into making the kernel and hardware support run smoothly that it's often the correct choice.

If you're on a reasonably modern machine, you just won't have to worry about running out of memory. There's only so much time you can spend "optimizing" your machine for performance instead of using it.

Your Own Kernel Might Not Be Supported

Canonical kernels on the Ubuntu website.

The disadvantage of running a custom kernel is that it's tied to your machine, instead of the generic kernel that will support a wide range of PCs. The customized kernel could break with the next OS update, such as with Ubuntu, because the developers will often assume correctly that most users are using the generic kernel.

If you reach out on a help forum or IRC, the users will most likely try to help you, but you might still be on your own since you built your own kernel.

Since generic kernels are so good these days, it might be fun to try just to try it if you think compiling is fun, but you should stick with the stock kernel if counting on the community to help you if something breaks down is important, you might just want to leave it alone. Or at least try it on a virtual or spare machine instead of your daily driver.

(Originally posted by David Delony)
×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

The M4 MacBook Pro has a boringly awesome reason f...
Waymo wants to use Google’s Gemini to train its ro...
 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Wednesday, 30 October 2024

Captcha Image

I Got A Virus and I Don't Know What To Do!

I Need Help!