Kernel and Module Management Commands in Linux (original) (raw)

Last Updated : 7 Jan, 2026

Kernel and module management commands in Linux are used to control, load, unload, and manage kernel modules and system services. These commands help administrators extend kernel functionality, manage hardware drivers, and control background services efficiently.

These commands are mainly used to:

Below are the commonly used Kernel and Module Management Commands in Linux

kernel_and_module_management_commands

1. depmod

The depmod command is used to generate dependency files for kernel modules. It ensures that modules are loaded in the correct order.

**Syntax:

depmod

**Example:

depmod

**Output:

depmod

**Note : The depmod command runs silently if executed successfully.

2. insmod

The insmod command is used to insert a specific kernel module into the running kernel.

**Syntax:

insmod module_name.ko

**Example:

insmod sample_driver.ko

**Note: Normally no output if successful, module silently loads

If something goes wrong, you may see errors like : No such file or Invalid module format ....

3. lsmod

The lsmod command displays all currently loaded kernel modules.

**Syntax:

lsmod

**Example:

lsmod

lsmod

4. modinfo

The modinfo command displays detailed information about a kernel module.

**Syntax:

modinfo module_name

**Example:

modinfo usb_storage

This shows detailed information about the usb_storage kernel module.

modinfo

5. rmmod

The rmmod command is used to remove a kernel module from the running kernel.

**Syntax:

rmmod module_name

**Example:

rmmod sample_driver

**Note: No output if successful If there is a problem, you may see errors

6. systemctl

The systemctl command is used to manage services controlled by systemd.

**Syntax:

systemctl command service_name

**Examples:

systemctl start apache2

systemctl status apache2

image---2025-11-11T170032819