1.2 Given a scenario, install, configure, and monitor kernel modules Flashcards
lsmod
lsmod will list the modules that are currently loaded
insmod
The low-level insmod utility requires a full module file name in order to insert a module into the kernel, which can be cumbersome. In addition, it does not load any module dependencies
modprobe
The modprobe utility only requires the module’s name. to install a module
modinfo
modinfo provides detailed module data
dmesg
dmesg displays the current kernel ring buffer
rmmod
rmmod is used to remove(unload) a module with no dependencies
depmod
You can employ the depmod command to scan through the system looking for any hardware that was not automatically detected. This is useful for troubleshooting problems with new devices
the depmod utility scans the system, determines any needed modules, reviews the modules’ dependencies, and updates the appropriate modules.dep file
modprobe -r
The modprobe utility is useful for removing modules that have one or more dependencies. You just need to add the -r switch
What extension do kernel files use?
Kernel modules files have a .ko file extension
Where are kernel module files typically stored?
typically located in a subdirectory of the /lib/modules/ directory.
There is a subdirectory for each particular Linux kernel version.
Some distributions have additional directories, such as /usr/lib/modules/, which are hard linked to the /lib/modules/ directory
Where are the locations of module configuration files?
Older Linux distributions use a single file, /etc/modules.conf, as their kernel modules configuration file
More modern distributions use configuration directories, which can be the
/etc/modprobe.d/
/etc /modules-load.d
/lib/modprobe.d/
/usr/lib/modprobe.d/
/run /modprobe.d/ directory.
Within configuration directories, module configuration files have a .conf file extension