How to Manage Linux Kernel Modules

Linux is the kernel for a variety of operating systems that power many of the world’s servers. Although the operating systems themselves are often commonly called Linux, the actual term refers specifically to this kernel and all of its parts. In addition to the components that are compiled into the kernel, Linux also supports modules that can be loaded or unloaded on demand.

Linux modules are useful for hardware drivers, network interfaces and much more. To find out which modules are running on your system, type from the command line as root:

# lsmod

The output might look something like this:

iptable_filter 12810 0

ip_tables 27239 1 iptable_filter

x_tables 34059 2 ip_tables,iptable_filter

kvm_intel 138567 0

kvm 431754 1 kvm_intel

ppdev 17671 0

binfmt_misc 17468 1

microcode 23656 0

psmouse 97655 0

serio_raw 13413 0

parport_pc 32701 0

parport 42299 2 ppdev,parport_pc

floppy 69370 0

The first column lists the module name. For example, kvm is Linux’s virtualization module. The second column is the size of the module, and the third column tells if the module is being used by another module. In the case of kvm, it depends on kvm_intel.

To find out more about a module, run modinfo [modulename]. For example:

# modinfo kvm

The output will resemble this:

filename: /lib/modules/3.11.0-19-generic/kernel/arch/x86/kvm/kvm.ko

license: GPL

author: Name

srcversion: ****


intree: Y

vermagic: 3.11.0-19-generic SMP mod_unload modversions

parm: ****

To load a module into the kernel, type modprobe [modulename]. For example:

# modprobe kvm

To remove a module, type rmmod [modulename]. For example:

#rmmod kvm

Linux kernel modules make it easy to load and unload components and drivers without having to reboot or reconfigure software. You can learn more about module management at

Related Posts