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 stat Command: Display Detailed File Metadata

Linux stat Command: Display Detailed File Metadata

Learn how to use the Linux stat command to inspect file size, permissions, ownership, timestamps, inode, and filesystem metadata, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Bash Command Operators Explained: ;, &&, ||, &, and |

Bash Command Operators Explained: ;, &&, ||, &, and |

Understand how Bash operators run commands sequentially, conditionally, in the background, or through pipelines, with practical examples and precedence guidance.

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 nmap Command: Scan Authorized Hosts and Ports

Linux nmap Command: Scan Authorized Hosts and Ports

Learn how to scan Authorized Hosts and Ports with the Linux nmap command, including practical examples, key options, and important precautions.

How to Check IP Addresses on Linux

How to Check IP Addresses on Linux

Learn how to check private and public IP addresses on Linux, identify the active interface and route, and distinguish IPv4, IPv6, and externally visible addresses.

Linux find Command: Search Files by Name, Type, Size, and Time

Linux find Command: Search Files by Name, Type, Size, and Time

Learn how to search with Linux find by name, file type, size, and modification time, combine expressions, run commands safely, and verify targets before deletion.

Linux w Command: Show Logged-In Users and Their Processes

Linux w Command: Show Logged-In Users and Their Processes

Learn how to show Logged-In Users and Their Processes with the Linux w command, including practical examples, key options, and important precautions.

Linux timedatectl Command: Check Time Zone and Time Synchronization

Linux timedatectl Command: Check Time Zone and Time Synchronization

Learn how to check Time Zone and Time Synchronization with the Linux timedatectl command, including practical examples, key options, and important precautions.

Linux Tutorial / File Types and Metadata: ls, file, stat, and readlink

Linux Tutorial / File Types and Metadata: ls, file, stat, and readlink

Learn what ls, file, stat, and readlink each reveal about a Linux file, including type, size, timestamps, and symbolic-link targets.

Linux realpath Command: Resolve Absolute and Canonical Paths

Linux realpath Command: Resolve Absolute and Canonical Paths

Learn how to use the Linux realpath command to resolve relative paths, symbolic links, and redundant path components, with essential options, practical examples, output interpretation, and common troubleshooting tips.