Every time the Linux system is booted, number of kernel modules are loaded by the system and used to provide additional support for filesystem, new hardware etc. Obtaining an information about particular kernel module may a be an important troubleshooting skill. In this article we will explain how to obtain module information such as description, dependency, author or relevant object file name using modinfo command.

Any loadable kernel module is by default installed within /lib/modules directory. For an each particular kernel a separate directory as created to contain modules to be used with that particular kernel:
# ls /lib/modules/
3.14.5-200.fc20.x86_64  3.14.6-200.fc20.x86_64  3.14.8-200.fc20.x86_64
From the above example we can see that this particular system has three kernels installed. Only one kernel can be run at any given time:
# uname -a
Linux localhost.localdomain 3.14.8-200.fc20.x86_64 #1 SMP Mon Jun 16 21:57:53 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

The above uname command output shows that 3.14.8-200.fc20 is a current system's running kernel and thus modules loaded from /lib/modules/3.14.8-200.fc20.x86_64/ directory are in use. To list all currently loaded kernel modules we can use lsmod command:
$ lsmod
...
e1000e                258512  0 
ghash_clmulni_intel    13216  0 
i2c_algo_bit           13257  1 i915
drm_kms_helper         50652  1 i915
drm                   283747  4 i915,drm_kms_helper
ptp                    18725  1 e1000e
pps_core               19130  1 ptp
...
From here we can dig mode information about any particular module using modinfo command. First, we can get the general module description:
$ modinfo -d e1000e
Intel(R) PRO/1000 Network Driver
What is the actual object file location for this particular module:
$ modinfo -n e1000e
/lib/modules/3.14.8-200.fc20.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
To see an object file location for any given installed Linux kernel -k switch can be used.
$ modinfo -k 3.14.5-200.fc20.x86_64 -n e1000e
/lib/modules/3.14.5-200.fc20.x86_64/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
Information about the author:
$ modinfo -a e1000e
Intel Corporation, <>
or to find module's dependency information we can use -F switch:
$ modinfo -F depends e1000e 
ptp
Executing modinfo with no parameters will cause modinfo command to print all available information.

Free Linux eBooks

Do you have the right skills?

Our IT Skills Watch page reflects an up to date IT skills demand leaning towards the Linux and Unix environment. We have considered a number of skills and operating systems.

See the result...

Linux Online Training

Learn to run Linux servers and prepare for LPI certification with Linux Academy. 104 available video lessons with PDF course notes with your own server!

Go to top