From the course: Advanced Linux: The Linux Kernel

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Loadable kernel modules (LKMs)

Loadable kernel modules (LKMs) - CentOS Tutorial

From the course: Advanced Linux: The Linux Kernel

Start my 1-month free trial

Loadable kernel modules (LKMs)

- [Instructor] Let's talk about loadable kernel modules, and let's start with an introduction to them. An introduction means what is a Linux kernel module? Well, a Linux kernel module is an object file, it's got object code in it, and it's distinguished by having a .ko suffix. So this object code, because it's a loadable kernel module, is going to be run inside the kernel. This mechanism allows for dynamically adding functionality to a running kernel. You're essentially adding in code that can be run without having to reboot. So Linux kernel modules are ordinarily written in C, and they're compiled for a particular kernel version. They're typically not binary compatible with different kernel versions. Any change in the kernel, any little change in the kernel version might break compatibility. So it's dangerous to try to force a compiled module into the wrong kernel version, and in fact there's some effort there to…

Contents