Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the lsmod command to list kernel module information in Linux

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to use the lsmod command to list kernel module information in Linux". The explanation in this article is simple and clear and easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use the lsmod command to list kernel module information in Linux".

1) Syntax: lsmod2) function:

The lsmod command beautifully displays the contents of / prco/module, which are information about modules that have been loaded by the kernel.

After using lsmod, the system will show the modules that already exist in the kernel, including:

1. Module name

two。 Size of the module (Size)

3. Is this module used by other modules (Used by)

You can use man to view help information

1 [root@mima ~] # man lsmod3) add:

Executing the lsmod instruction lists all modules that have been loaded into the system. The core of the Linux operating system has the feature of modularization, so when compiling the core, you must put all the functions into the core. These functions can be compiled into separate modules and loaded separately when needed.

4) usage

Common usage

[root@mima ~] # lsmodModule Size Used byFM_CPC_DRV 194495 4autofs4 26513 38021q 25349 0

Used with the grep command, such as

[root@mima ~] # lsmod | grep-I ext4ext4 374902 3jbd2 93427 1 ext4mbcache 8193 1 ext45) Kernel related commands

Lsmod modinfo depmod rmmod inmod modprobe

Use lsmod to view the modules that have been loaded in the current system, and you can also unload the modules that have been loaded through modprobe and rmmod.

6) other common information viewing commands

View CPU information: cat / proc/cpuinfo view board information: cat / proc/pci view PCI information: lspci example: lspci | grep Ethernet view network card model view memory information: cat / proc/meminfo view USB device: cat / proc/bus/usb/devices view keyboard and mouse: cat / proc/bus/input/devices view system hard drive information and usage: fdisk & disk-l & df view interrupt requests for each device (IRQ ): cat / proc/interrupts View system Architecture: uname-a

Uname-r

Uname-m

Dmidecode view hardware information, including bios, cpu, memory and other information dmesg | more view hardware information

7) the "/ proc" file can be browsed using the file view command

The file contains system-specific information:

Cpuinfo host CPU information Dma host DMA channel information Filesystems file system information Interrupts host interrupt information Ioprots host Imax O port number information Meninfo host memory information Version Linux memory version information (compiler version of the compiled kernel)

You can use: cat / proc/ to view the name of the file information

Thank you for reading, the above is the content of "how to use the lsmod command to list kernel module information in Linux". After the study of this article, I believe you have a deeper understanding of how to use the lsmod command to list kernel module information in Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report