Sobes.tech
Junior — Middle

How to perform kernel module loading via command line?

sobes.tech AI

Answer from AI

To load a kernel module in Linux, the modprobe or insmod command is used.

  • insmod loads a specific module by its full path but does not handle dependencies.
  • modprobe is more convenient as it automatically loads module dependencies.

Example of loading a module with modprobe:

sudo modprobe module_name

To load a module directly (without dependency handling):

sudo insmod /path/to/module.ko

To check loaded modules, you can use:

lsmod

To unload a module:

sudo modprobe -r module_name