lsmod - Unix, Linux Command



NAME

lsmod - list loaded modules.

SYNOPSIS

  • lsmod [options]
  • DESCRIPTION

    lsmod shows information about all loaded modules. The format is name, size, use count, list of referring modules. The information displayed is identical to that available from /proc/modules. If the module controls its own unloading via a can_unload routine then the user count displayed by lsmod is always -1, irrespective of the real use count. The module files are with .ko extension.

    EXAMPLES

    Example-1:

    To list Currently Loaded Modules:

    # lsmod

    output:

    # lsmod
    Module                  Size  Used by
    ipt_MASQUERADE         16384  3
    nf_nat_masquerade_ipv4    16384  1 ipt_MASQUERADE
    iptable_nat            16384  1
    nf_nat_ipv4            16384  1 iptable_nat
    nf_nat                 24576  2 nf_nat_ipv4,nf_nat_masquerade_ipv4
    nf_conntrack_ipv4      16384  2
    nf_defrag_ipv4         16384  1 nf_conntrack_ipv4
    xt_conntrack           16384  1
    nf_conntrack          106496  5 nf_nat,nf_nat_ipv4,xt_conntrack,nf_nat_masquerade_ipv4,nf_conntrack_ipv4
    ipt_REJECT             16384  2
    nf_reject_ipv4         16384  1 ipt_REJECT
    xt_CHECKSUM            16384  1
    iptable_mangle         16384  1
    xt_tcpudp              16384  6
    bridge                110592  0
    stp                    16384  1 bridge
    llc                    16384  2 stp,bridge
    ip6table_filter        16384  0
    ip6_tables             28672  1 ip6table_filter
    iptable_filter         16384  1
    ip_tables              28672  3 iptable_filter,iptable_mangle,iptable_nat
    ebtable_nat            16384  0
    ebtables               36864  1 ebtable_nat
    x_tables               36864  11 ip6table_filter,xt_CHECKSUM,ip_tables,xt_tcpudp,ipt_MASQUERADE,xt_conntrack,iptable_filter,ebtables,ipt_REJECT,iptable_mangle,ip6_tables
    iosf_mbi               16384  0
    ppdev                  20480  0
    coretemp               16384  0
    crct10dif_pclmul       16384  0
    crc32_pclmul           16384  0
    ghash_clmulni_intel    16384  0
    aesni_intel           172032  0
    aes_x86_64             20480  1 aesni_intel
    vmw_balloon            16384  0
    lrw                    16384  1 aesni_intel
    gf128mul               16384  1 lrw
    glue_helper            16384  1 aesni_intel
    ablk_helper            16384  1 aesni_intel
    cryptd                 20480  3 ghash_clmulni_intel,aesni_intel,ablk_helper
    serio_raw              16384  0
    snd_ens1371            32768  0
    snd_ac97_codec        131072  1 snd_ens1371
    ac97_bus               16384  1 snd_ac97_codec
    gameport               20480  1 snd_ens1371
    snd_rawmidi            32768  1 snd_ens1371
    vmwgfx                176128  1
    snd_seq_device         16384  1 snd_rawmidi
    snd_pcm               106496  2 snd_ac97_codec,snd_ens1371
    btusb                  40960  0
    snd_timer              32768  1 snd_pcm
    ttm                    94208  1 vmwgfx
    drm_kms_helper        126976  1 vmwgfx
    snd                    86016  6 snd_ac97_codec,snd_timer,snd_pcm,snd_rawmidi,snd_ens1371,snd_seq_device
    bluetooth             491520  2 btusb
    soundcore              16384  1 snd
    drm                   344064  4 ttm,drm_kms_helper,vmwgfx
    vmw_vmci               65536  0
    i2c_piix4              24576  0
    shpchp                 40960  0
    8250_fintek            16384  0
    parport_pc             32768  0
    mac_hid                16384  0
    lp                     20480  0
    parport                45056  3 lp,ppdev,parport_pc
    hid_generic            16384  0
    usbhid                 53248  0
    hid                   110592  2 hid_generic,usbhid
    psmouse               114688  0
    mptspi                 24576  2
    mptscsih               40960  1 mptspi
    ahci                   36864  0
    e1000                 135168  0
    libahci                32768  1 ahci
    mptbase               102400  2 mptspi,mptscsih
    scsi_transport_spi     32768  1 mptspi
    pata_acpi              16384  0

     

    same loaded modules can also be seen in /proc/modules

    # cat /proc/modules
    ipt_MASQUERADE 16384 3 - Live 0xffffffffc06be000
    nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE, Live 0xffffffffc06b9000
    iptable_nat 16384 1 - Live 0xffffffffc06b4000
    nf_nat_ipv4 16384 1 iptable_nat, Live 0xffffffffc0696000
    nf_nat 24576 2 nf_nat_masquerade_ipv4,nf_nat_ipv4, Live 0xffffffffc06a8000
    nf_conntrack_ipv4 16384 2 - Live 0xffffffffc0691000
    nf_defrag_ipv4 16384 1 nf_conntrack_ipv4, Live 0xffffffffc06a3000
    xt_conntrack 16384 1 - Live 0xffffffffc069e000
    nf_conntrack 106496 5 nf_nat_masquerade_ipv4,nf_nat_ipv4,nf_nat,nf_conntrack_ipv4,xt_conntrack, Live 0xffffffffc0676000
    ipt_REJECT 16384 2 - Live 0xffffffffc0671000
    nf_reject_ipv4 16384 1 ipt_REJECT, Live 0xffffffffc066c000
    xt_CHECKSUM 16384 1 - Live 0xffffffffc0662000
    iptable_mangle 16384 1 - Live 0xffffffffc065d000
    xt_tcpudp 16384 6 - Live 0xffffffffc0667000
    bridge 110592 0 - Live 0xffffffffc0641000
    stp 16384 1 bridge, Live 0xffffffffc063c000
    llc 16384 2 bridge,stp, Live 0xffffffffc0633000
    ip6table_filter 16384 0 - Live 0xffffffffc062e000
    ip6_tables 28672 1 ip6table_filter, Live 0xffffffffc0622000
    iptable_filter 16384 1 - Live 0xffffffffc061d000
    ip_tables 28672 3 iptable_nat,iptable_mangle,iptable_filter, Live 0xffffffffc03b0000
    ebtable_nat 16384 0 - Live 0xffffffffc03ab000
    ebtables 36864 1 ebtable_nat, Live 0xffffffffc039d000
    x_tables 36864 11 ipt_MASQUERADE,xt_conntrack,ipt_REJECT,xt_CHECKSUM,iptable_mangle,xt_tcpudp,ip6table_filter,ip6_tables,iptable_filter,ip_tables,ebtables, Live 0xffffffffc050a000
    iosf_mbi 16384 0 - Live 0xffffffffc0618000
    ppdev 20480 0 - Live 0xffffffffc0612000
    coretemp 16384 0 - Live 0xffffffffc0609000
    crct10dif_pclmul 16384 0 - Live 0xffffffffc0604000
    crc32_pclmul 16384 0 - Live 0xffffffffc05f7000
    ghash_clmulni_intel 16384 0 - Live 0xffffffffc05ff000
    aesni_intel 172032 0 - Live 0xffffffffc05cc000
    aes_x86_64 20480 1 aesni_intel, Live 0xffffffffc05c6000
    vmw_balloon 16384 0 - Live 0xffffffffc05c1000
    lrw 16384 1 aesni_intel, Live 0xffffffffc0593000
    gf128mul 16384 1 lrw, Live 0xffffffffc058e000
    glue_helper 16384 1 aesni_intel, Live 0xffffffffc0589000
    ablk_helper 16384 1 aesni_intel, Live 0xffffffffc04c9000
    cryptd 20480 3 ghash_clmulni_intel,aesni_intel,ablk_helper, Live 0xffffffffc04ce000
    serio_raw 16384 0 - Live 0xffffffffc0505000
    snd_ens1371 32768 0 - Live 0xffffffffc0530000
    snd_ac97_codec 131072 1 snd_ens1371, Live 0xffffffffc0568000
    ac97_bus 16384 1 snd_ac97_codec, Live 0xffffffffc04dd000
    gameport 20480 1 snd_ens1371, Live 0xffffffffc03d4000
    snd_rawmidi 32768 1 snd_ens1371, Live 0xffffffffc04d4000
    vmwgfx 176128 1 - Live 0xffffffffc053c000
    snd_seq_device 16384 1 snd_rawmidi, Live 0xffffffffc0338000
    snd_pcm 106496 2 snd_ens1371,snd_ac97_codec, Live 0xffffffffc0515000
    btusb 40960 0 - Live 0xffffffffc059c000
    snd_timer 32768 1 snd_pcm, Live 0xffffffffc04fc000
    ttm 94208 1 vmwgfx, Live 0xffffffffc05a9000
    drm_kms_helper 126976 1 vmwgfx, Live 0xffffffffc0430000
    snd 86016 6 snd_ens1371,snd_ac97_codec,snd_rawmidi,snd_seq_device,snd_pcm,snd_timer, Live 0xffffffffc04e6000
    bluetooth 491520 2 btusb, Live 0xffffffffc0450000
    soundcore 16384 1 snd, Live 0xffffffffc02c8000
    drm 344064 4 vmwgfx,ttm,drm_kms_helper, Live 0xffffffffc03db000
    vmw_vmci 65536 0 - Live 0xffffffffc03c3000
    i2c_piix4 24576 0 - Live 0xffffffffc0388000
    shpchp 40960 0 - Live 0xffffffffc03b8000
    8250_fintek 16384 0 - Live 0xffffffffc02e8000
    parport_pc 32768 0 - Live 0xffffffffc0362000
    mac_hid 16384 0 - Live 0xffffffffc02a8000
    lp 20480 0 - Live 0xffffffffc02ae000
    parport 45056 3 ppdev,parport_pc,lp, Live 0xffffffffc029c000
    hid_generic 16384 0 - Live 0xffffffffc031a000
    usbhid 53248 0 - Live 0xffffffffc038f000
    hid 110592 2 hid_generic,usbhid, Live 0xffffffffc036c000
    psmouse 114688 0 - Live 0xffffffffc0345000
    mptspi 24576 2 - Live 0xffffffffc033e000
    mptscsih 40960 1 mptspi, Live 0xffffffffc0323000
    ahci 36864 0 - Live 0xffffffffc032e000
    e1000 135168 0 - Live 0xffffffffc02ef000
    libahci 32768 1 ahci, Live 0xffffffffc0311000
    mptbase 102400 2 mptspi,mptscsih, Live 0xffffffffc02ce000
    scsi_transport_spi 32768 1 mptspi, Live 0xffffffffc02bf000
    pata_acpi 16384 0 - Live 0xffffffffc02b7000

    Print
    Advertisements