You are here: >

Linux and Unix modinfo command

modinfo commandAbout modinfo
modinfo syntax
modinfo examples
Related commands
Linux and Unix main page

About modinfo

modinfo shows information about a Linux kernel module.

Description

modinfo extracts information from the Linux kernel modules given on the command line. If modulename is not a filename, then the /lib/modules/kernel-version directory is searched — the same directory searched by modprobe when loading kernel modules.

By default, modinfo lists each attribute of the module in the form:

fieldname : value

The module filename is listed the same way.

modinfo can understand modules of any Linux Kernel architecture.

modinfo syntax

modinfo [-0] [-F field] [-k kernel] [modulename|filename...]
modinfo -V
modinfo -h

Options

-V, --version Print the version of modinfo, and exit.
-F, --field fieldname Only print the value of the field named fieldname. Field names are case-insensitive. Common field names are author, description, license, parm, depends, and alias. There are often multiple fields for a given field name, for instance parm, alias, and depends. Multiple values are printed one per line. The special field name, filename, lists the filename of the module.
-k kernel Provide information about a kernel other than the running one. This is particularly useful for distributions needing to extract information from a newly-installed (but not yet running) set of kernel modules.
-0, --null Use the ASCII NULL character to separate field values, instead of a newline. This is useful for parsing field data, because a newline might be part of a field's value.
-a, -d, -l, -p, -n These are shortcuts for displaying the fields author, description, license, parm, and filename.

modinfo examples

modinfo snd

Display all available information about the snd Linux kernel module. Output will resemble the following:

filename:       /lib/modules/3.2.0-4-686-pae/kernel/sound/core/snd.ko
alias:          char-major-116-*
license:        GPL
description:    Advanced Linux Sound Architecture driver for soundcards.
author:         Jaroslav Kysela <perex@perex.cz>
license:        GPL
description:    Jack detection support for ALSA
author:         Mark Brown <broonie@opensource.wolfsonmicro.com>
depends:        soundcore
intree:         Y
vermagic:       3.2.0-4-686-pae SMP mod_unload modversions 686 
parm:           slots:Module names assigned to the slots. (array of charp)
parm:           major:Major # for sound driver. (int)
parm:           cards_limit:Count of auto-loadable soundcards. (int)
modinfo -F parm snd

Display all parm (parameter) fields for the snd Linux kernel module. Output will resemble the following (Note that the field name does not prefix the field values):

slots:Module names assigned to the slots. (array of charp)
major:Major # for sound driver. (int)
cards_limit:Count of auto-loadable soundcards. (int)

depmod — Generate a list of kernel module dependencies and associated map files.
insmod — Insert a module into the Linux kernel.
lsmod — Show the status of Linux kernel modules.
modprobe — Add and remove modules from the Linux kernel.
rmmod — Remove a module from the Linux kernel.