You are here: >

Linux and Unix insmod command

insmod commandAbout insmod
insmod syntax
insmod examples
Related commands
Linux and Unix main page

About insmod

insmod is a simple program which inserts a module into the Linux kernel.

Overview

insmod is similar to modprobe: it can insert a module into the Linux kernel. Unlike modprobe, however, insmod does not read its modules from a set location and automatically insert them and take care of any dependencies. insmod can insert a single module from any location, and does not consider dependencies when doing so. It's a much lower-level program; in fact, it's the program modprobe uses to do the actual module insertion.

insmod syntax

insmod [filename] [module-options...]

Technical Description

insmod takes as its arguments the filename of a kernel module and any module-specific options, module-options, which the module takes upon insertion.

The only error messages insmod can issue are very general ones, since the actual work of linking the module is done within the kernel itself. Since any errors issued will be generated by the kernel, they are best viewed with dmesg.

insmod examples

insmod /path/to/snd-usb-audio.ko

Insert the snd-usb-audio module into the kernel, specifying no module options.

insmod /path/to/snd-usb-audio.ko snd-cmipci snd_id="first" snd_mpu_port=0x330

Insert the snd-usb-audio module into the kernel, specifying the module options "snd-cmipci", "snd_id="first"", and "snd_mpu_port=0x330".

depmod — Generate a list of kernel module dependencies and associated map files.
lsmod — Show the status of Linux kernel modules.
modinfo — Show information about a Linux kernel module.
modprobe — Add and remove modules from the Linux kernel.
rmmod — Remove a module from the Linux kernel.