Linux: Find Out If a Particular Driver / Feature Compiled Into Running Kernel or Not

Linux: Find Out If a Particular Driver / Feature Compiled Into Running Kernel or Not

To find out if a particular driver or feature is compiled into the running kernel in Linux, you can use the "lsmod" command. This command lists the currently loaded kernel modules, which are drivers or other features that are compiled into the kernel.

To use the "lsmod" command, open a terminal and run the following command:

lsmod
So‮ru‬ce:www.lautturi.com

This will list the loaded kernel modules and their dependencies. The output will include the name of the module, the size of the module, and the dependencies.

For example, to find out if the "bluetooth" driver is compiled into the kernel, you can search the output of the "lsmod" command for the "bluetooth" module. If the module is listed, it means that the driver is compiled into the kernel.

$ lsmod | grep bluetooth
bluetooth             638944  8 btrtl,btintel,btbcm,bnep,btusb

In the above example, the "bluetooth" module is listed, which means that the Bluetooth driver is compiled into the kernel.

Alternatively, you can use the "grep" command to search for a specific driver or feature in the "config" file of the kernel. The "config" file lists the configuration options of the kernel and indicates which drivers and features are compiled into the kernel.

To search the "config" file, run the following command:

grep -i DRIVER_NAME /boot/config-$(uname -r)

Replace "DRIVER_NAME" with the name of the driver or feature that you want to search for.

Created Time:2017-10-30 10:17:44  Author:lautturi