Bootstrap FreeKB - Linux Commands - insmod (insert a module)
Linux Commands - insmod (insert a module)

Updated:   |  Linux Commands articles

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
. . .

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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