modinfo
Modinfo is a Linux command used to display information about a kernel module file (.ko) or a module in the kernel. It reads metadata embedded in the module, which is produced from the module’s source code by the build system. This metadata helps users and system tools understand a module’s characteristics, licensing, dependencies, and compatibility with the running kernel.
Common fields shown by modinfo include:
- filename: the module file path
- license: the licensing terms (for example, GPL)
- description: a brief description of the module
- author: the authors of the module
- alias: device or module aliases
- depends: other modules required for this module to function
- vermagic: kernel version and configuration compatibility
- intree: whether the module is part of the kernel source tree
- srcversion: a hash representing the module’s source version
In addition, if the module declares parameters via macros such as MODULE_PARM and MODULE_PARM_DESC, modinfo can
Usage is straightforward: modinfo takes a module file or a path to a .ko file as an
Notes and limitations: modinfo does not load or modify kernel state and does not require the module
See also: modprobe, insmod, lsmod, kmod, and the MODULE_* metadata macros used in kernel module sources.