Insert a module using the INSMOD command in Linux

Home > Search > Linux commands
  by

The insmod command can be used to insert a module into the kernel. The file for a certain module will be somewhere below the /lib/modules directory. The lsmod command can be used to list the modules that are currently loaded into the kernel. In this example, the bcma module is not currently loaded into the kernel.

[john.doe@server1 ~]# lsmod | sort
arc4         12608  0
ata_generic  12910  0
ata_piix     35038  0
auth_rpcgss  59314  1  nfsd
. . .

 

The modinfo command shows that the filename for the bcma module is /lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/bcma/bcma.ko.

[john.doe@server1 ~]# modinfo -n bcma
filename:    /lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/bcma/bcma.ko

 

The insmod command can be used to load the insert the acpi module into the kernel.

[john.doe@server1 ~]# insmod /lib/modules/3.10.0-327.36.3.el7.x86_64/kernel/drivers/bcma/bcma.ko

 

The lsmod command now shows that the bcma module is loaded into the kernel.

[john.doe@server1 ~]# lsmod | sort
arc4         12608  0
ata_generic  12910  0
ata_piix     35038  0
auth_rpcgss  59314  1  nfsd
bcma         51886  0
bluetooth   372944  5  bnep
. . .

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments