Chapter 37. Kernel Modules
button
battery
ac
md5
ipv6
ohci_hcd
e100
mii
floppy
sg
dm_snapshot
dm_zero
dm_mirror
ext3
jbd
dm_mod
ips
aic7xxx
sd_mod
scsi_mod
For each line, the first column is the name of the module, the second column is the size of the module,
and the third column is the use count.
The /sbin/lsmod output is less verbose and easier to read than the output from viewing /proc/
modules.
To load a kernel module, use the /sbin/modprobe command followed by the kernel module name.
By default, modprobe attempts to load the module from the /lib/modules/<kernel-version>/
kernel/drivers/ subdirectories. There is a subdirectory for each type of module, such as the net/
subdirectory for network interface drivers. Some kernel modules have module dependencies, meaning
that other modules must be loaded first for it to load. The /sbin/modprobe command checks for
these dependencies and loads the module dependencies before loading the specified module.
For example, the command
/sbin/modprobe e100
loads any module dependencies and then the e100 module.
To print to the screen all commands as /sbin/modprobe executes them, use the -v option. For
example:
/sbin/modprobe -v e100
Output similar to the following is displayed:
/sbin/insmod /lib/modules/2.6.9-5.EL/kernel/drivers/net/e100.ko Using /lib/
modules/2.6.9-5.EL/kernel/drivers/net/e100.ko Symbol version prefix 'smp_'
The /sbin/insmod command also exists to load kernel modules; however, it does not resolve
dependencies. Thus, it is recommended that the /sbin/modprobe command be used.
To unload kernel modules, use the /sbin/rmmod command followed by the module name. The
rmmod utility only unloads modules that are not in use and that are not a dependency of other modules
in use.
338
6481
0
8901
0
4805
0
4033
1
232833
16
21713
0
39493
0
4673
1 e100
58481
0
33377
0
17029
0
2369
0
22957
2
116809
2
71257
1 ext3
54741
6 dm_snapshot,dm_zero,dm_mirror
46173
2
148121
0
17217
3
121421
4 sg,ips,aic7xxx,sd_mod
Need help?
Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?