lsmod command lists all loaded modules: name, size (in 4 KB units), and, if appropriate, a list of referring modules. The same information is available in /proc/modules if the /proc directory is enabled on the system.
The output of lsmod is a series of columns identifying the module name, size, use number, and status. A sample of lsmod output looks like this:
Module Size Used by Not tainted vfat 12844 0 (autoclean) fat 38328 0 (autoclean) [vfat] nfs 79960 0 (autoclean) ide-scsi 11984 0 (autoclean) ide-cd 35196 0 (autoclean) cdrom 33440 0 (autoclean) [ide-cd] tuner 11680 1 (autoclean) tvaudio 14940 0 (autoclean) (unused) bttv 73568 0 (autoclean) videodev 8192 2 (autoclean) [bttv] radeon 114244 28 agpgart 46752 3 parport_pc 18756 1 (autoclean) lp 8868 0 (autoclean) parport 36480 1 (autoclean) [parport_pc lp]
If you encounter below error while running the lsmod command:
lsmod: command not found
you may install the kmod package as shown below as per your choice of distribution:
Distribution | Command |
---|---|
Debian | apt-get install kmod |
Ubuntu | apt-get install kmod |
Alpine | apk add kmod |
Arch Linux | pacman -S kmod |
Kali Linux | apt-get install kmod |
CentOS | yum install kmod |
Fedora | dnf install kmod |
Raspbian | apt-get install kmod |
Conclusion
The lsmod command displays all the information available about currently loaded modules. Reviewing your loaded modules is often the first step in identifying possible problems, such as driver conflicts (quite frequently found with USB device drivers). This information can also be found in /proc/modules. lsmod has only two options, neither of them affecting its operation.