The Linux Process Journey — kmod (Linux Kernel Module Handling)

Shlomi Boutnaru, Ph.D.
1 min readFeb 14, 2024

--

“kmod” is an ELF file which is located at “/bin/kmod”, by the way “/bin” is usually a symbolic link to “/usr/bin” so we can find the binary at “/usr/bin/kmod”. It is used mainly for managing Linux kernel modules (https://linux-kernel-labs.github.io/refs/heads/master/labs/kernel_modules.html). It is important to understand that “kmod” is a multi-call binary that implements utilities used to manage kernel modules. Hence, most users will not run it directly (https://man7.org/linux/man-pages/man8/kmod.8.html).

Overall, by using “kmod” we can load/remove/insert/show information/resolve dependencies of kernel modules (https://linuxhint.com/linux-kmod-command/). “kmod” is developed by Lucas De Marchi (https://github.com/kmod-project/kmod).

Lastly, the most well known utilities used to control kernel modules are just symbolic links to “kmod” examples are: lsmod, rmmod, modinfo, modprobe and depmod (more on those in future writeups) — as shown in the screenshot below. See you in my next writeup ;-) You can follow me on twitter — @boutnaru (https://twitter.com/boutnaru). Also, you can read my other writeups on medium — https://medium.com/@boutnaru. You can find my free eBooks at https://TheLearningJourneyEbooks.com.

--

--