Linux modinfo Command: Inspect Kernel Module Details
modinfo displays the description, path, license, aliases, and parameters of the specified kernel module file. It does not load the module or change its settings.
What is the modinfo command?
It can take a module name or file path as an argument. filename refers to the module file's location, parm refers to supported parameters, and depends refers to dependent modules. The query is based on the set of modules for the currently running kernel, so be careful of kernel version differences.
Basic syntax
modinfo [options] module_name|file_path
Installed implementations and options may vary by distribution. Check the description for your current system using man modinfo.
Examples
Complete module information
Check the provided fields such as description and file location.
modinfo overlay
Output file path only
Check where the module file is installed.
modinfo -n overlay
Check Parameters
Look at the parameters that can be specified when loading and their descriptions.
modinfo -p overlay
Checking the Source of Module Information
modinfo retrieves information about installed kernel module files such as description, license, dependencies, and parameters. Whether it is actually loaded needs to be checked separately with lsmod.
modinfo -F license nf_conntrack
Example output in an environment where the module is installed:
GPL
If the module's metadata cannot be found, Module ... not found may appear. Check module files and built-in module metadata for the current kernel version (uname -r). Do not confuse information for another kernel version with the state of the running kernel.
Main Options and Format
| Options/Format | Description |
|---|---|
-n |
Only prints the module file path. |
-F field |
Prints only the specified field value. |
-p |
Displays module parameters. |
-k release |
Queries modules for the specified kernel release. |
-V |
Displays the tool version. |
Precautions when using
Seeing module metadata does not mean it is currently loaded. To check whether it is loaded, verify separately with lsmod or related kernel information. The existence of parameters and their actual applied values can differ, and changing values may affect devices and services.
Frequently Asked Questions
Does the absence of a modinfo result mean the module does not exist?
It may not have been able to find the module file for the specified kernel. Check the name, path, and current kernel release, and also see if the functionality is built into the kernel.
Official Documentation
The exact behavior of options and differences between implementations can be checked in the official modinfo-related documentation.









