How to Build and Install a Linux Kernel from Source on Ubuntu

I find myself fairly regularly hearing about new features in the Linux kernel (the core of Linux operating systems), getting excited, and checking to see if my distribution’s repository of packages has the latest kernel built. Unfortunately, Ubuntu’s repositories don’t get new kernel versions for a long time. Ubuntu 24.04 LTS still ships a 6.8 kernel, while kernel.org is on 7.2 as I’m writing this.

Fortunately, the Linux kernel is open source, so we can freely download the kernel’s source code, compile it, and install it.

This article walks through building the current stable kernel on Ubuntu 24.04 LTS (Noble Numbat) and installing it as a normal .deb package. The same steps work on Debian and most other Ubuntu releases. (I originally wrote this for Ubuntu 19.10 and Linux 5.4 back in 2020, and updated it in 2026, since several steps no longer work the old way.)

Continue reading How to Build and Install a Linux Kernel from Source on Ubuntu