Linux lsmod Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux lsmod Guide
Complete beginner-friendly guide to lsmod on Linux, covering Arch Linux, CachyOS, and other distributions including listing kernel modules, module information, and driver management.
Table of Contents
Understanding lsmod
What is lsmod?
lsmod lists loaded kernel modules.
Uses:
- List modules: Show loaded modules
- Module information: Get module details
- Driver management: Manage drivers
- Troubleshooting: Troubleshoot module issues
Why it matters:
- Driver management: See loaded drivers
- Troubleshooting: Debug module problems
- System information: Understand system modules
lsmod Basics
List Modules
Basic usage:
# List all loaded modules
lsmod
# Shows module list
Output Format
Columns:
# Output format:
# Module Size Used by
# module_name 12345 2 other_module
Module Information
Module Details
Get details:
# Get module details
modinfo module-name
# Shows module information
Module Dependencies
Check dependencies:
# Check what uses module
lsmod | grep module-name
# Shows dependent modules
Module Management
Load Module
Load module:
# Load module
sudo modprobe module-name
# Or
sudo insmod /path/to/module.ko
Remove Module
Remove module:
# Remove module
sudo modprobe -r module-name
# Or
sudo rmmod module-name
Troubleshooting
Module Not Found
Check module:
# Verify module exists
modinfo module-name
# Check if loaded
lsmod | grep module-name
Summary
This guide covered lsmod usage, module listing, and driver management for Arch Linux, CachyOS, and other distributions.
Next Steps
- modinfo Guide - Module information
- modprobe Guide - Module management
- Kernel Management - Kernel management
- lsmod Documentation:
man lsmod
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.