Linux: Find out what kernel drivers (modules) are loaded

by on October 10, 2007 · 8 comments· LAST UPDATED April 18, 2008

in , ,

Q. How do I find out what Linux kernel drivers and loaded by my Linux distribution? How do I list device drivers (modules) loaded in memory?

A. Under Linux use the file /proc/modules shows what kernel modules (drivers) are currently loaded.

lsmod command

You need to use lsmod command to show the status of modules in the Linux Kernel. Simply type the lsmod at a shell prompt:
$ lsmod
Output:

Module                  Size  Used by
binfmt_misc            12680  1
rfcomm                 40856  0
l2cap                  25856  5 rfcomm
bluetooth              55908  4 rfcomm,l2cap
ppdev                  10116  0
acpi_cpufreq           10056  1
cpufreq_stats           7360  0
cpufreq_userspace       5408  0
cpufreq_conservative     8200  0
cpufreq_ondemand        9228  4
cpufreq_powersave       2688  0
freq_table              5792  3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
pcc_acpi               13184  0
dev_acpi               12292  0
tc1100_wmi              8068  0
sony_acpi               6284  0
dock                   10268  0
sbs                    15652  0
asus_acpi              17308  0
ac                      6020  0
battery                10756  0
i2c_ec                  6016  1 sbs
video                  16388  0
backlight               7040  1 asus_acpi
container               5248  0
button                  8720  0
nls_utf8                3072  1
ntfs                  107764  1
eeprom                  8336  0
i2c_i801                9356  0
sbp2                   23812  0
lp                     12452  0
fuse                   46612  0
af_packet              23816  2
snd_hda_intel          21912  4
snd_hda_codec         205056  1 snd_hda_intel
snd_pcm_oss            44544  0
snd_mixer_oss          17408  1 snd_pcm_oss
snd_pcm                79876  4 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_dummy           4740  0
snd_seq_oss            32896  0
tuner                  61864  0
snd_seq_midi            9600  0
snd_rawmidi            25472  1 snd_seq_midi
bttv                  173684  0
video_buf              26116  1 bttv
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
ir_common              31236  1 bttv
nvidia               6224240  24
compat_ioctl32          2304  1 bttv
snd_seq                52592  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
i2c_algo_bit            8712  1 bttv
btcx_risc               5896  1 bttv
snd_timer              23684  3 snd_pcm,snd_seq
snd_seq_device          9100  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
tveeprom               15888  1 bttv
iTCO_wdt               11812  0
iTCO_vendor_support     4868  1 iTCO_wdt
parport_pc             36388  1
agpgart                35400  1 nvidia
tsdev                   8768  0
parport                36936  3 ppdev,lp,parport_pc
snd                    54020  16 snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               8672  1 snd
i2c_core               22656  8 i2c_ec,eeprom,i2c_i801,tuner,bttv,nvidia,i2c_algo_bit,tveeprom
rt61                  245128  1
psmouse                38920  0
snd_page_alloc         10888  2 snd_hda_intel,snd_pcm
videodev               28160  1 bttv
v4l2_common            25216  3 tuner,bttv,videodev
v4l1_compat            15236  1 videodev
serio_raw               7940  0
shpchp                 34324  0
pci_hotplug            32576  1 shpchp
evdev                  11008  3
pcspkr                  4224  0
ipv6                  268960  20
ext3                  133128  1
jbd                    59816  1 ext3
mbcache                 9604  1 ext3
sg                     36252  0
sr_mod                 17060  0
sd_mod                 23428  4
cdrom                  37664  1 sr_mod
generic                 5124  0 [permanent]
ata_generic             9092  0
ohci1394               36528  0
ieee1394              299448  2 sbp2,ohci1394
pata_marvell            7936  0
ata_piix               15492  3
libata                125720  3 ata_generic,pata_marvell,ata_piix
scsi_mod              142348  5 sbp2,sg,sr_mod,sd_mod,libata
e1000                 126016  0
ehci_hcd               34188  0
uhci_hcd               25360  0
usbcore               134280  3 ehci_hcd,uhci_hcd
thermal                14856  0
processor              31048  2 acpi_cpufreq,thermal
fan                     5636  0
fbcon                  42656  0
tileblit                3584  1 fbcon
font                    9216  1 fbcon
bitblit                 6912  1 fbcon
softcursor              3200  1 bitblit
vesafb                  9220  0
capability              5896  0
commoncap               8192  1 capability

Get more information about driver

To get more information about specific driver, enter:
modinfo {driver-name}
$ modinfo e1000
Output:

filename:       /lib/modules/2.6.20-16-generic/kernel/drivers/net/e1000/e1000.ko
version:        7.3.15-k2-NAPI
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, 
srcversion:     037027F24F37E1AAEFC4360
alias:          pci:v00008086d000010C5sv*sd*bc*sc*i*
TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 8 comments… read them below or add one }

1 Raju October 10, 2007 at 8:14 am

nice commnand

Reply

2 Matthew October 19, 2007 at 7:01 pm

Thanks man for the post.

One thing I cannot find out though is what the “used by” numbers stand for. I can see the other modules using a module for some of them but this usually doesn’t reveal anything.

Reply

3 Jaime January 25, 2010 at 6:57 pm

Great!!! This post help me so much.

Thanks man!

Reply

4 SIFE November 30, 2010 at 6:34 am

Can I list only module names, I tried this but is doesn’t work:

lsmod | grep ^"[a-ZA-Z0-9]"

Reply

5 nixCraft November 30, 2010 at 8:16 am

Try
lsmod | awk '{ print $4}'
OR
awk '{ print $1 }' /proc/modules

Reply

6 shobin February 17, 2012 at 1:10 pm

hi,
how can i know which modules are necessary or unnecessary,in case of using in a board ? how it is used?how to work? pls help me ….i am a beginner…so pls explain it…..

Reply

7 Sven Svensson March 28, 2012 at 3:30 pm

this list a modules not drivers. there are drivers compiled into kernel and are not loadable modules, so you won’t see them with this command.
This command list only modules, a module doesn’t have to call driver_register().

Reply

8 cata February 25, 2014 at 10:38 pm

thank you very much! that modinfo command you showed is so so helpful, it clears very much what a module is.
precise and concise!

Reply

Leave a Comment

Tagged as: , , , , , , , ,

Previous Faq:

Next Faq: