Linux-kernel-modules
Jump to navigation
Jump to search
Description
Modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system. For example, one type of module is the device driver, which allows the kernel to access hardware connected to the system."
Modules are installed in /lib/modules/<kernel_version>/.
Commands
List loaded modules
The following command lists loaded modules:
$ lsmod
Module information
The modinfo command will show information about installed modules, based on the information from the /proc/modules file:
$ modinfo <module>
It can also be used to read information from a *.ko file.
$ modinfo 87d792e35d83d9ce023c44c8fd6f5806.ko filename: /lib/modules/3.13.0-53-generic/kernel/misc/87d792e35d83d9ce023c44c8fd6f5806.ko license: GPL depends: vermagic: 3.2.0-4-amd64 SMP mod_unload modversions
Install a module
$ sudo modprobe <module>
or
$ sudo insmod /lib/modules/full/path/module.ko
Uninstall a loaded module
$ sudo modprobe -r <module>