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
- sum command in Linux with Examples
- yes command in Linux with Examples
- ip command in Linux with examples
- cvs command in Linux with Examples
- which command in Linux with examples
- cut command in Linux with examples
- w command in Linux with Examples
- cp command in Linux with examples
- atq command in linux with examples
- last command in Linux with Examples
- wc command in Linux with examples
- tac command in Linux with Examples
- cpp command in Linux with Examples
- tee command in Linux with examples
- top 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 firstname.lastname@example.org. 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.