I was just browsing our forum and come across the following question:

How do I find out detailed information about a Linux Kernel module or device drivers?

You need to use modinfo command to display or show information about a Linux Kernel loaded modules. Use lsmod command to obtain list of loaded modules.

modinfo extracts information from the Linux Kernel modules given on the command line. This is not just useful to find out about information about loaded modules but it can be used to identify modules inserted by crackers/hackers (try less /proc/modules). Also following is a good way to verify output reported by ps ax :
# ps ax | wc -l
# ls -d /proc/* | grep [0-9]|wc -l

Usually rootkit will install their own ps command, which hides kernel modules. If second output is larger than the first (ps ax) command output take a closer look at your server.

Back to our main question, the modinfo command outputs following information for each module:
=> Module Author
=> Module description
=> License
=> Parameter and filename

Task: Display list of modules

$ lsmod
$ less /proc/modules

Task: Display information about ide-cd module

$ /sbin/modinfo ide-cd

filename:       /lib/modules/2.6.8-2-686/kernel/drivers/ide/ide-cd.ko
description:    ATAPI CD-ROM Driver
license:        GPL
vermagic:       2.6.8-2-686 preempt 686 gcc-3.3
depends:        ide-core,cdrom

Task: Display information about rt61 module

$ /sbin/modinfo rt61

filename:       /lib/modules/2.6.8-2-686/kernel/net/wireless/rt61.ko
author:         Paul Lin 
description:    RT61 Wireless Lan Linux Driver
vermagic:       2.6.8-2-686 preempt 686 gcc-3.3
alias:          pci:v00001814d00000301sv*sd*bc*sc*i*
alias:          pci:v00001814d00000302sv*sd*bc*sc*i*
alias:          pci:v00001814d00000401sv*sd*bc*sc*i*

You can load modules automatically during Linux system boot sequence by adding a module name to /etc/modules.conf (Red Hat and friends) or /etc/modules (Debian / Ubuntu Linux) file.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one
CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Klacar Nebojsa Apr 3, 2009 @ 6:38

    Sorry, there is something: I have troubles installing external USB speakers, type Genius SP-i202U. Can I get related tips and tricks about troubleshooting it on my Fedora 8?


  • Alvaro Mar 25, 2010 @ 22:56

    Hi there,

    If x module is listed using the commands described above, it means that the x module is up and runing ?

    Thanks in advance

  • SysAdmin Sep 13, 2013 @ 9:17

    “ls -d /proc/* | grep [0-9]|wc -l” command shows result in one line bigger than “ps ax | wc -l” command. And this pretty normal, on my system it’s because /proc/fairsched2 entry. So I think the grep condition must be more strict in the second command.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum