Find Out Linux Kernel Modules ( Drivers ) Location / Directory

htt‮/:sp‬/www.lautturi.com
Find Out Linux Kernel Modules ( Drivers ) Location / Directory

In Linux, kernel modules (also known as drivers) are dynamically loadable pieces of code that extend the functionality of the kernel. Kernel modules are usually stored in the /lib/modules/ directory, organized by the kernel version that they are compatible with.

To find out which kernel modules are currently loaded on your system, you can use the "lsmod" command. This command will list all of the loaded kernel modules and their dependencies.

For example, to list all of the loaded kernel modules on a system with the kernel version 5.4.0-101-generic, you could use the following command:

lsmod | grep 5.4.0-101-generic

This will list all of the kernel modules that are currently loaded and that are compatible with the 5.4.0-101-generic kernel.

You can also use the "find" command to search for specific kernel modules within the /lib/modules/ directory. For example, to search for all kernel modules that contain the string "nvidia" in their names, you could use the following command:

find /lib/modules/ -name "*nvidia*"

This will search the /lib/modules/ directory for files with names that contain the string "nvidia". The output will include the full path to each matching file.

Note that some kernel modules may be stored in other directories or may be built into the kernel image itself, rather than being stored as separate files.

Created Time:2017-10-28 20:40:30  Author:lautturi