When we install Linux Like operating system at that time Linux kernel install most of device driver’s modules and after the installation it also allows us to install new device drivers as modules using the commands modprobe and insmod.

Normally kernel modules are loaded automatically but sometimes you need to install the additional modules as being manual . For instance you want to install device drivers of storage device and etc. For this there are some commands some of them are listed below.

  1. lsmod command

lsmod stand for “list module“. This command is showing currently loading modules on system and also is easy usable command.

[[email protected]~]# lsmod


If you want to find a specific module. This can be network driver module (e1000) then you can do via grep command.

[[email protected] ~]# lsmod | grep e1000


2. Modinfo Command

modinfo stand for “module information”. This command is showing information about a kernel module. For instance you want to learn about network driver module:

[[email protected] ~]# modinfo e1000


Output of modinfo command clearly show version of this module, description which is showing the manufacture factory, license is GPL and other important information.

3. modprobe command is used to add and remove module from the kernel. Linux maintains kernel module directory under ‘/lib/modules/’uname -r’/kernel/drivers/‘ and configuration files(except for additional configuration file in /etc/modprobe.d/). If we want to look at kernel drivers then run the beneath command.

 [[email protected] ~]# ls /lib/modules/3.10.0-327.18.2.el7.x86_64/kernel/drivers/


If we need to add  i8k kernel module which this module is using for “accessing SMM BIOS on Dell laptops”

[[email protected] ~]# modprobe i8k

if output of this command is being any error,  then you can use –quite options that with this flag modprobe won’t print error messages.

Note:You also can use insmod command for adding new module

-r option in modprobe command is used to remove a kernel module. Let’s assume we want to remove the floppy module.

[[email protected] ~]# modprobe -r floppy

4. Remove kernel module

-r option in modprobe command is used to remove a kernel module. Let’s assume we want to remove the floppy module.

[[email protected] ~]# modprobe -r floppy   

There we remove floppy module from kernel after that you type

 [[email protected] ~]# lsmod | grep floppy

You see nothing. If you want to add this module again you can type

[[email protected] ~]# modprobe floppy

At some point of time we may get issues while loading the modules or modules not loaded properly. To overcome these errors we can add or load modules forcefully using –force’ option (-f) in the modprobe command.

[[email protected] ~]# modprobe –f floppy

If we still face problems or errors while loading the modules, then this time we must do debugging.By enabling debugging we can find exact error or issue before or after installing the modules. In other words debugging is equivalent of dry-run of loading modules.‘-n’ option in the modprobe command can enable this type of debugging. This option will force modprobe command to perform all module loading steps except the final one.

 [[email protected] ~]#  modprobe –vn ‘module_name’

We can also see dependency of the module with using ‘–show-depends‘ in the modprobe command, example is shown below

[[email protected] ~]# modprobe –show-depends e1000

That’s all for this article. I hope you got an idea how to list, install and remove kernel module in Linux.


Babak Mammadov, I was born in Azerbaijan. I am engaged with Linux and Open Source technologies. I have articles more than 30 in my native language. I would like to share my knowledge with other learners. For this I am here.


Please enter your comment!
Please enter your name here