Notes to Self

Alex Sokolsky's Notes on Computers and Programming

Kernel Modules

https://www.tecmint.com/load-and-unload-kernel-modules-in-linux/

List

Read the contents of /proc/modules:

lsmod

Low Level Module Load/UnLoad

Load the speedstep-lib.ko module:

insmod /lib/modules/4.4.0-21-generic/kernel/drivers/cpufreq/speedstep-lib.ko

Unload (remove) the speedstep-lib.ko module:

rmmod /lib/modules/4.4.0-21-generic/kernel/drivers/cpufreq/speedstep-lib.ko

Manage Kernel Modules Using modprobe

modprobe man page

modprobe searches the module directory /lib/modules/$(uname -r) for the modules and related files, but excludes alternative configuration files in /etc/modprobe.d directory.

To insert a module:

modprobe speedstep-lib

To remove the module:

modprobe -r speedstep-lib

Note: Under modprobe, automatic underscore conversion is performed, so there is no difference between _ and – while entering module names.