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.

More in This Category
Linux apropos Command: Search Commands by Description

Linux apropos Command: Search Commands by Description

Learn how to use the Linux apropos command to find relevant manual pages by searching description keywords, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux hostnamectl Command: Show and Change the Host Name

Linux hostnamectl Command: Show and Change the Host Name

Learn how to show and Change the Host Name with the Linux hostnamectl command, including practical examples, key options, and important precautions.

Linux history Command: Review and Reuse Shell Command History

Linux history Command: Review and Reuse Shell Command History

Learn how to use the Linux history command to review, search, reuse, and manage shell command history, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux file Command: Identify File Types and Formats

Linux file Command: Identify File Types and Formats

Learn how to use the Linux file command to identify file formats from their contents instead of filename extensions, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux zip Command: Create ZIP Archives

Linux zip Command: Create ZIP Archives

Learn how to create ZIP Archives with the Linux zip command, including practical examples, key options, and important precautions.

Linux sudo Command: Run Commands with Elevated or Another User's Privileges

Linux sudo Command: Run Commands with Elevated or Another User's Privileges

Learn how to use the Linux sudo command to run approved commands with elevated privileges or as another user, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux tmux Command: Detach and Reattach Terminal Sessions

Linux tmux Command: Detach and Reattach Terminal Sessions

Learn how to detach and Reattach Terminal Sessions with the Linux tmux command, including practical examples, key options, and important precautions.

Linux pkill Command: Signal Processes by Name

Linux pkill Command: Signal Processes by Name

Learn how to signal Processes by Name with the Linux pkill command, including practical examples, key options, and important precautions.

Linux ip Command: Inspect and Configure Network Interfaces and Routes

Linux ip Command: Inspect and Configure Network Interfaces and Routes

Learn how to inspect and Configure Network Interfaces and Routes with the Linux ip command, including practical examples, key options, and important precautions.

Linux shutdown Command: Schedule a Shutdown or Restart

Linux shutdown Command: Schedule a Shutdown or Restart

Learn how to schedule a Shutdown or Restart with the Linux shutdown command, including practical examples, key options, and important precautions.