modinfo command in Linux system is used to display the information about a Linux Kernel module. This command extracts the information from the Linux kernel modules given on the command line. If the module name is not a file name, then the /lib/modules/kernel-version directory is searched by default. modinfo can understand modules from any of the Linux Kernel architecture.
modinfo [-0] [-F field] [-k kernel] [modulename|filename...]
- modinfo command with help option: It will print the general syntax of the modinfo along with the various options and gives a brief description about each option.
- modinfo -V: This option gives the version information of modinfo command.
- modinfo -F: This option only print this field value, one per line. Field names are case-insensitive. Common fields that may include author, description, license, parm, depends, and alias. There are possibly multiple parm, alias and depends on fields. The special field filename lists are the filename of the module.
modinfo -F modulename
- modinfo -b : This option is the root directory for modules.
modinfo -b modulename
- modinfo -k : This option provides the information about a kernel other than the running one. This option is particularly being useful for the distributions that need to extract information from a newly installed set of kernel modules. For example, to find which firmware files are needed by various modules inside a new kernel for which you need to make an initrd/initramfs image prior to booting.
modinfo -k modulename
- modinfo -0: This option use the ASCII zero character to separate field values, instead of a new line. This option is proven useful for scripts since a new line can theoretically appear inside a field.
modinfo bluetooth -0
- modinfo -a –author, -d –description, -l –license, -p –parameters, -n –filename: These are the shortcuts used for the –field flag’s author, description, license, parm and filename arguments to make the transition from the old modutils modinfo easy.
modinfo bluetooth -a
modinfo bluetooth -n
modinfo bluetooth -d
modinfo bluetooth -l
modinfo bluetooth -p
- bg command in Linux with Examples
- until command in Linux with Examples
- bc command in Linux with examples
- ps command in Linux with Examples
- ar command in Linux with examples
- scp command in Linux with Examples
- tar command in Linux with examples
- apt-get command in Linux with Examples
- fc Command in Linux with Examples
- man command in Linux with Examples
- gcc command in Linux with examples
- rcp Command in Linux with examples
- last command in Linux with Examples
- seq command in Linux with Examples
- id command in Linux with examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.