用 lsmod 列出已加载的内核模块
lsmod 将 /proc/modules 格式化为易读表格,包含已加载模块、大小和使用计数。
运行 `lsmod` 可列出所有已加载内核模块及其大小和被哪些模块使用;用 `modinfo <模块>` 查看详细信息。
01命令
命令
$ lsmod02作用说明
lsmod 本质上是 /proc/modules 的格式化输出,包含 Module、Size 和 Used by 三列——Used by 列是卸载模块前查看依赖关系的关键。配合 `modinfo <名称>` 可以读取模块的许可证、版本和描述,用 `lsmod | grep iwlwifi` 之类的检查可以确认无线或显卡驱动是否真的已加载。
03风险
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- modinfo(8) - Show information about a Linux Kernel module依据: modinfo extracts information (license, author, description, filename) from a Linux Kernel module given its name or filename.
- lsmod(8) - Show the status of modules in the Linux Kernel依据: lsmod is a trivial program which nicely formats the contents of /proc/modules, showing what kernel modules are currently loaded with size and Used by references.
最后验证: 2026-09-17 · 分类: 系统与设置