Linux Modules



Modules, sometimes referred to as drivers can be configured into the kernel to load automatically, however sometimes you may find you'll need to load a module manually. First, lets look at some of the commands used concerning modules.
 

lsmod

This command, when typed in a console will tell you what modules are currently loaded.

insmod

This command will load a module, for example to load the module for my network card I would type:

insmod tulip

This will load the module during the current session only.


Loading Modules At Bootup



There are a couple of ways to load a module at bootup.
 

etc/modules.conf

To load a module in this file you would use the alias command.

The Alias command will bind or associate a module with a device followed by the module. Below you'll see I've aliased the network card (eth0) to the tulip module and I've aliased the sound device to the module for my sound card:

alias eth0 tulip

alias sound-slot-0 es1371


/etc/modules

Another place you can load modules at bootup is in the /etc/modules file. For example, if you wanted to load the parport module (used for external parallel port devices), using a text editor, add the following line to the end of the "modules" file in /etc:

parport


To unload a module, type:

modprobe -r nameofmodule