Basic Kernel Management

Nov 17, 2025

Managing Kernel Modules

  • lsmod lists kernel modules
  • lspci -k list kernel modules that are loaded for the PCI devices
  • udevadm monitor dynamically trace loading of kernel modules
  • modprobe loads kernel modules manually
  • modprobe -r unload a kernel module
  • modinfo lists kernel parameters while loading modules
  • dmesg lists kernel messages, use it to verify that a module was loaded

Exploring the /proc filesystem

  • kernel.org - Proc

  • man 5 proc to get information about kernel parameters

  • For more information, install the kernel documentation, kernel-doc, and access it through /usr/shar/doc/kernel-doc

Using sysctl

Arch - sysctl

  • sysctl can be used to make /proc settings persistent
  • sysctl -a lists an overview of parameters
    • Parameters shown are filenames relative to /proc/sys
  • To change settings, add the parameter to /etc/sysctl.d

Updating the Kernel

dnf update kernel

Knowledge Check

  1. What does ICMP stand for?
  2. When tuned and sysctl parameters are in conflict, how can you determine which setting will be applied?
  3. What does PCI stand for?
  4. What process dynamically loads kernel modules when triggered by hardware events?
  5. How can you influence how modules and related parameters are loaded?
  6. How can you load a kernel module with its parameters automatically?
Answers
  1. Internet Control Message Protocol - a network protocol used to send error messages and operational information to diagnose issues with network communication
  2. The reapply_sysctl parameter in /etc/tuned/tuned-main.conf
  3. Peripheral Component Interconnect - a high-speed interface standard for connecting expansion cards to a computer’s motherboard
  4. systemd-udevd
  5. Modify/add rules in /usr/lib/udev/rules.d and /etc/udev/rules.d
  6. Use a configuration file in /etc/modprobe.d

Lab Exercise

  • Find the appropriate parameter to disable answers to ping requests.
  • Test if it works by using ping localhost
Solution
sysctl --write net.ipv4.icmp_echo_ignore_all=0
sysctl --write net.ipv6.icmp.echo_ignore_all=0

- Clint Jordan