The kernel is the heart of the Operating System. Linux Kernel could be Monolithic or Modular. A monolithic kernel supports everything (hardware, network, file systems) compiled from a single file; mostly used in embedded systems. A Modular kernel comprises of some drivers compiled as object files, which can be loaded or removed anytime. Modular kernel doesn’t need to be always recompiled when a hardware is added.
To check you current kernel version, enter the command:
uname -a
uname -r
More on Modular Kernel…
The modular kernel consists of the kernel itself and athe kernel modules.
All modules of a kernel are stored in /lib/modules/$(uname -r) and have a file extension of ko.
Controlling Kernel modules: utilities supplied by nmdutils package
lsmod – lists currently loaded kernel modules
syntax:
lsmod
rmmod – low level command used to remove a module
syntax:
rmmod modulename
insmod – low level command used to insert a module
syntax:
insmod filename
modinfo – display module details
depmode – determines module dependencies and rebuilds /lib/modules/kernel-version/modules.dep
modprobe – loads and removes modules, takes care of dependencies. configuration files is stored in /etc/module.conf & /etc/conf.modules.
syntax:
sudo modprobe modulename
sudo modprobe -r modulename
e.g.
sudo modprobe vfat
lsmod | grep fat output:
vfat 17335 0
fat 55505 1 vfat
sudo modprobe -r vfat
lsmod | grep fat output:
--output blank--