Howto: Display List of Modules or Device Drivers In the Linux Kernel

by on September 14, 2006 · 7 comments· LAST UPDATED June 9, 2013

in , ,

How do I display the list of loaded Linux Kernel modules or device drivers on Linux operating systems?

You need to use lsmod program which show the status of loaded modules in the Linux Kernel. Linux kernel use a term modules for all hardware device drivers.

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
Requirementslsmod
Estimated completion timeLess than a one minute
Please note hat lsmod is a trivial program which nicely formats the contents of the /proc/modules, showing what kernel modules are currently loaded.

This is an important task. With lsmod you can verify that device driver is loaded for particular hardware. Any hardware device will only work if device driver is loaded.

Task: List or display loaded modules

Open a terminal or login over the ssh session and type the following command
$ less /proc/modules
Sample outputs:

sha1_generic 1759 4 - Live 0xffffffffa059e000
arc4 1274 2 - Live 0xffffffffa0598000
ecb 1841 2 - Live 0xffffffffa0592000
ppp_mppe 5240 2 - Live 0xffffffffa058b000
ppp_async 6245 1 - Live 0xffffffffa0584000
crc_ccitt 1323 1 ppp_async, Live 0xffffffffa057e000
ppp_generic 19291 6 ppp_mppe,ppp_async, Live 0xffffffffa0572000
slhc 4003 1 ppp_generic, Live 0xffffffffa056c000
ext3 106854 1 - Live 0xffffffffa0546000
jbd 37349 1 ext3, Live 0xffffffffa0533000
sha256_generic 8692 2 - Live 0xffffffffa0525000
aes_x86_64 7340 2 - Live 0xffffffffa0517000
aes_generic 25714 1 aes_x86_64, Live 0xffffffffa050b000
....
...
....
ahci 32950 20 - Live 0xffffffffa007b000
libata 133824 3 ata_generic,pata_jmicron,ahci, Live 0xffffffffa0045000
scsi_mod 126901 3 usb_storage,sd_mod,libata, Live 0xffffffffa0012000
thermal 11674 0 - Live 0xffffffffa0009000
thermal_sys 11942 3 video,processor,thermal, Live 0xffffffffa0000000

To see nicely formatted output, type:
$ lsmod
Sample outputs:

Module                  Size  Used by
sha1_generic            1759  4
arc4                    1274  2
ecb                     1841  2
ppp_mppe                5240  2
ppp_async               6245  1
crc_ccitt               1323  1 ppp_async
ppp_generic            19291  6 ppp_mppe,ppp_async
slhc                    4003  1 ppp_generic
ext3                  106854  1
jbd                    37349  1 ext3
sha256_generic          8692  2
aes_x86_64              7340  2
aes_generic            25714  1 aes_x86_64
cbc                     2539  1
nfsd                  254974  13
exportfs                3186  1 nfsd
nfs                   241498  0
lockd                  57651  2 nfsd,nfs
fscache                29882  1 nfs
nfs_acl                 2031  2 nfsd,nfs
auth_rpcgss            33524  2 nfsd,nfs
sunrpc                161756  12 nfsd,nfs,lockd,nfs_acl,auth_rpcgss
fuse                   51020  1
dm_crypt               10680  1
it87                   15879  0
hwmon_vid               1828  1 it87
coretemp                4325  0
loop                   11799  0
snd_pcm                60487  0
usb_storage            40233  0
i915                  257462  0
snd_timer              15598  1 snd_pcm
drm_kms_helper         20369  1 i915
snd                    46542  2 snd_pcm,snd_timer
ata_generic             3239  0
drm                   143120  2 i915,drm_kms_helper
soundcore               4598  1 snd
snd_page_alloc          6265  1 snd_pcm
uhci_hcd               18537  0
i2c_algo_bit            4209  1 i915
psmouse                49969  0
ehci_hcd               32145  0
video                  17445  1 i915
i2c_i801                7830  0
evdev                   7352  2
pata_jmicron            2280  0
pcspkr                  1699  0
serio_raw               3752  0
usbcore               123399  4 usb_storage,uhci_hcd,ehci_hcd
i2c_core               15835  5 i915,drm_kms_helper,drm,i2c_algo_bit,i2c_i801
nls_base                6567  1 usbcore
output                  1692  1 video
e1000e                124884  0
button                  4650  1 i915
processor              29951  0
ext4                  288755  2
mbcache                 5050  2 ext3,ext4
jbd2                   67175  1 ext4
crc16                   1319  1 ext4
dm_mod                 53994  6 dm_crypt
raid456                44516  4
md_mod                 73936  5 raid456
async_raid6_recov       5186  1 raid456
async_pq                3495  2 raid456,async_raid6_recov
raid6_pq               77179  2 async_raid6_recov,async_pq
async_xor               2494  3 raid456,async_raid6_recov,async_pq
xor                     4380  1 async_xor
async_memcpy            1198  2 raid456,async_raid6_recov
async_tx                1750  5 raid456,async_raid6_recov,async_pq,async_xor,async_memcpy
sd_mod                 29953  25
crc_t10dif              1276  1 sd_mod
ahci                   32950  20
libata                133824  3 ata_generic,pata_jmicron,ahci
scsi_mod              126901  3 usb_storage,sd_mod,libata
thermal                11674  0
thermal_sys            11942  3 video,processor,thermal

First column is Module name and second column is the size of the modules i..e the output format is module name, size, use count, list of referring modules.

Finding more info about any module or driver

Type the following command:
# modinfo driver-Name-Here
# modinfo thermal_sys
# modinfo e1000e

Sample outputs:

filename:       /lib/modules/2.6.32-5-amd64/kernel/drivers/net/e1000e/e1000e.ko
version:        1.2.20-k2
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, 
srcversion:     AB58ACECA1618E521F58503
alias:          pci:v00008086d00001503sv*sd*bc*sc*i*
alias:          pci:v00008086d00001502sv*sd*bc*sc*i*
alias:          pci:v00008086d000010F0sv*sd*bc*sc*i*
alias:          pci:v00008086d000010EFsv*sd*bc*sc*i*
alias:          pci:v00008086d000010EBsv*sd*bc*sc*i*
alias:          pci:v00008086d000010EAsv*sd*bc*sc*i*
alias:          pci:v00008086d00001525sv*sd*bc*sc*i*
alias:          pci:v00008086d000010DFsv*sd*bc*sc*i*
alias:          pci:v00008086d000010DEsv*sd*bc*sc*i*
alias:          pci:v00008086d000010CEsv*sd*bc*sc*i*
alias:          pci:v00008086d000010CDsv*sd*bc*sc*i*
alias:          pci:v00008086d000010CCsv*sd*bc*sc*i*
alias:          pci:v00008086d000010CBsv*sd*bc*sc*i*
alias:          pci:v00008086d000010F5sv*sd*bc*sc*i*
alias:          pci:v00008086d000010BFsv*sd*bc*sc*i*
alias:          pci:v00008086d000010E5sv*sd*bc*sc*i*
alias:          pci:v00008086d0000294Csv*sd*bc*sc*i*
alias:          pci:v00008086d000010BDsv*sd*bc*sc*i*
alias:          pci:v00008086d000010C3sv*sd*bc*sc*i*
alias:          pci:v00008086d000010C2sv*sd*bc*sc*i*
alias:          pci:v00008086d000010C0sv*sd*bc*sc*i*
alias:          pci:v00008086d00001501sv*sd*bc*sc*i*
alias:          pci:v00008086d00001049sv*sd*bc*sc*i*
alias:          pci:v00008086d0000104Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000104Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000104Asv*sd*bc*sc*i*
alias:          pci:v00008086d000010C4sv*sd*bc*sc*i*
alias:          pci:v00008086d000010C5sv*sd*bc*sc*i*
alias:          pci:v00008086d0000104Csv*sd*bc*sc*i*
alias:          pci:v00008086d000010BBsv*sd*bc*sc*i*
alias:          pci:v00008086d00001098sv*sd*bc*sc*i*
alias:          pci:v00008086d000010BAsv*sd*bc*sc*i*
alias:          pci:v00008086d00001096sv*sd*bc*sc*i*
alias:          pci:v00008086d0000150Csv*sd*bc*sc*i*
alias:          pci:v00008086d000010F6sv*sd*bc*sc*i*
alias:          pci:v00008086d000010D3sv*sd*bc*sc*i*
alias:          pci:v00008086d0000109Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000108Csv*sd*bc*sc*i*
alias:          pci:v00008086d0000108Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Fsv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Esv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Dsv*sd*bc*sc*i*
alias:          pci:v00008086d000010B9sv*sd*bc*sc*i*
alias:          pci:v00008086d000010D5sv*sd*bc*sc*i*
alias:          pci:v00008086d000010DAsv*sd*bc*sc*i*
alias:          pci:v00008086d000010D9sv*sd*bc*sc*i*
alias:          pci:v00008086d00001060sv*sd*bc*sc*i*
alias:          pci:v00008086d000010A5sv*sd*bc*sc*i*
alias:          pci:v00008086d000010BCsv*sd*bc*sc*i*
alias:          pci:v00008086d000010A4sv*sd*bc*sc*i*
alias:          pci:v00008086d0000105Fsv*sd*bc*sc*i*
alias:          pci:v00008086d0000105Esv*sd*bc*sc*i*
depends:
vermagic:       2.6.32-5-amd64 SMP mod_unload modversions
parm:           copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)
parm:           TxIntDelay:Transmit Interrupt Delay (array of int)
parm:           TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)
parm:           RxIntDelay:Receive Interrupt Delay (array of int)
parm:           RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)
parm:           InterruptThrottleRate:Interrupt Throttling Rate (array of int)
parm:           IntMode:Interrupt Mode (array of int)
parm:           SmartPowerDownEnable:Enable PHY smart power down (array of int)
parm:           KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)
parm:           WriteProtectNVM:Write-protect NVM [WARNING: disabling this can lead to corrupted NVM] (array of int)
parm:           CrcStripping:Enable CRC Stripping, disable if your BMC needs the CRC (array of int)
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 7 comments… read them below or add one }

1 Harshal February 18, 2008 at 11:00 am

Is there any way by which I can know for example “xyz” module is for “xyz” hardware?

Reply

2 Harshal February 18, 2008 at 11:03 am

Sorry for another comment…

Actually my objective is to find what device drivers(modules) are loaded for my hardware and is there any hardware which doesn’t have the right module installed for it.

Thanks
Harshal.

Reply

3 Alex October 14, 2008 at 1:36 pm

@Harshal
Hey!

Maybe it is a little bit late, but try out this command: “lspci -v”.

It’ll show a huge list of all PCI devices and all kind of information INCLUDING the current used module.

Hope, it helps.

Alex

Reply

4 mike October 3, 2009 at 3:18 pm

helped me thanks.
what command would i use to output the above commands directly to a file?
thanks again

Reply

5 Alex October 3, 2009 at 5:35 pm

Use the directing “>” symbol.
E.g.
lspci -v > filename.txt

Alex

Reply

6 Ruphus May 23, 2012 at 2:25 pm

Hi,

what about listing modules which are *NOT* loaded in the kernel?
I.E finding out what’s supported with your kernel?

Reply

7 mamma August 19, 2013 at 11:22 am

You can find them as .ko files in /lib/modules/”your kernel folder name”.
Also they are listed in the modules.dep file in the same folder as above.

Reply

Leave a Comment

Tagged as: , , ,

Previous Faq:

Next Faq: