How to display or show information about a Linux Kernel module or drivers
I was just browsing our forum and come across following question:
How do I find out detailed information about a Linux Kernel module or device drivers?
Use modinfo command. It use 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 use to identify modules inserted by crackers/hackers (try less /proc/modules). Also following is also good to verify output reported by ps ax :
# ps ax | wc -l
77
# ls -d /proc/* | grep [0-9]|wc -l
78
Usually rootkit 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
Output:
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
Output:
filename: /lib/modules/2.6.8-2-686/kernel/net/wireless/rt61.ko author: Paul Lindescription: RT61 Wireless Lan Linux Driver vermagic: 2.6.8-2-686 preempt 686 gcc-3.3 depends: 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.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Howto: Prevent a Linux kernel module from auto loading
- ATI Card Installation Fedora Core Linux 6 How-To
- FreeBSD: How To List Device Drivers ( modules ) Loaded In Memory
- Linux: Find out how many file descriptors are being used
- FreeBSD Load Device Driver / Kernel Module
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


Recent Comments
Today ~ 13 Comments
Today ~ 9 Comments
Yesterday ~ 3 Comments
Yesterday ~ 1 Comment
Yesterday ~ 2 Comments