Kernel Module Management (lsmod, modprobe, insmod)
Expert · 30 minutes · 100 points
Dive deep into Linux kernel module management in this expert-level lab. You will explore how kernel modules work, list the modules loaded in the kernel your container shares with your computer, inspect module metadata and dependencies with modinfo, depmod and modprobe, see exactly what modprobe and insmod would do to load and unload a module (and why a container is not allowed to), and configure module parameters and persistent loading. The lab works on a real Ubuntu 22.04 kernel module tree installed in the container, so nothing touches your own kernel.
What you’ll learn
- List and interpret currently loaded kernel modules using lsmod and /proc/modules
- Inspect module metadata, dependencies, and parameters using modinfo and depmod
- Plan module loads and unloads with modprobe and insmod/rmmod, understand the difference between them, and why containers cannot load modules
- Explore module dependency resolution and understand how modprobe handles dependency chains
- Audit module state and persist module configuration using /etc/modules and modprobe.d
How this lab works
- Start the lab: One click starts a container on your computer with a real terminal: nothing to install by hand, nothing to clean up.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work runs each task’s checks in your container and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: A container on your computer, with a real terminal
- Image: ubuntu:22.04
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
Topics: kernel, modules, lsmod, modprobe, insmod, rmmod, modinfo, depmod, linux-internals, sysadmin
Create a free account to start this lab.