Interview Prep/Linux/Boot Process & Kernel

What is a kernel module and how do you manage them?

IntermediateConceptBoot Process & Kernel
Answer

In one line: A kernel module is a piece of code — usually a driver — that can be added to or removed from the running kernel without rebooting.

Simple analogy: the kernel is like a phone, and modules are like apps. You install only what you need, and you can add or remove them while the phone is on.

Everyday commands:

lsmod                          # list loaded modules
modinfo br_netfilter           # details about a module
sudo modprobe br_netfilter     # load a module (and anything it depends on)
sudo modprobe -r br_netfilter  # unload it

Load a module automatically at every boot:

echo "br_netfilter" | sudo tee /etc/modules-load.d/k8s.conf

Real DevOps example: when you set up a Kubernetes node, you load the overlay and br_netfilter modules. Kubernetes networking and container storage need them — without them, pod networking doesn't work properly.

All Linux questions Roadmap: Linux

More on Boot Process & Kernel