Kernel modules
From Linux 101, The beginner's guide to all things Linux.
Kernel modules have some very important roles. They supply your computer with the ability to use the hardware on your system. They also tell the kernel how to use that hardware, like filesystems.
Using Windows terminology, you could consider a kernel module a "driver" of sorts.
Modules are very powerful. They are the most influencial software on your system because they are ran in kernel space and not the user space like all of your other programs. This means they have access to more powerful assembly instructions and can access all of your memory (unlike programs). It is a good idea to never run modules from an untrusted source -- this is not necessarily a common occurence but it is better for you to be warned on this so it never happens to you.
[edit] Location
Modules are usually stored under /lib/modules/<kernel-version> directory. If you ever want to browse it is fine to do so.
In the following section <modulename> is used. It should be clarified how you can read module names. Here is a cut of two of modules:
-rw-r--r-- 1 root root 5672 Jun 28 12:14 cryptoloop.ko -rw-r--r-- 1 root root 21043 Jun 28 12:14 loop.ko
The <modulename>s here are cryptoloop and loop. The 2.6.x series kernel uses the file extension .ko, and the 2.4.x series uses .o . You will never need to use the file extension on any of the module commands, as they have built them to add the appropriate extension for you.
[edit] Module Commands
lsmod will list the current kernel modules that are loaded.
insmod <modulename> will load a module, but not check dependencies.
modprobe <modulename> will load the modules, and any other modules it depends on. This is the better of the two module loading programs to use.
rmmod <modulename> will unload a kernel module.
[edit] Module dependencies
Modules may have dependencies among them. For example, to use a pcmcia wireless card, you need the modules for the card, but also you need them for the pcmcia bus on your system. There was a time in Linux when there was no easy way to do this but to know to load the pcmcia bus modules first, then the wireless card. (That's probably a poor example because wireless did not exist when this was an issue, but you get the idea.) Modern Linux allows for the module programs to work out the dependencies between them, however.
The command that determines intermodule dependencies is depmod. When you install the kernel modules, usually the install script will automatically run this for you. depmod sets up the information that allows modprobe to understand what order modules must be started in order to avoid problems.

