Jump to content

Guide to Unix/Commands/Kernel Commands

From Wikibooks, open books for an open world

lsmod

[edit | edit source]

lsmod lists the modules loaded by the Linux kernel.

Links:

  • lsmod, manpages.ubuntu.com

modprobe

[edit | edit source]

modprobe loads a Linux kernel module. You can specify only the name of the module, and modprobe will load it from the correct location and also load any dependent modules.

Many modules load automatically. For example, Linux loads a USB keyboard module when a USB keyboard is attached. It also loads the base USB modules as dependencies. Some modules must be loaded manually, and "modprobe" is the easiest way to do this.

Links:

sysctl

[edit | edit source]

sysctl sets a parameter to change the behavior of the kernel. The available parameters vary by kernel, so check the man page for sysctl in your distribution.

Examples:

Check the setting for the "vm.swapencrypt.enable" parameter:

$ sysctl vm.swapencrypt.enable
vm.swapencrypt.enable=0

Root can set the parameter to 1.

$ sysctl vm.swapencrypt.enable=1
vm.swapencrypt.enable: 0 -> 1

Links: