How modinfo works?

How modinfo works?

modinfo extracts information from the Linux Kernel modules given on the command line. If the module name is not a filename, then the /lib/modules/version directory is searched, as is also done by modprobe(8) when loading kernel modules. This version of modinfo can understand modules of any Linux Kernel architecture.

How to check module information in Linux?

You need to use modinfo command to display or show information about a Linux Kernel loaded modules. Use lsmod command to obtain list of loaded modules. Usually rootkit will install their own ps command, which hides kernel modules.

What is Vermagic?

Vermagic is a magic string present in the Linux Kernel and added into the . modinfo section of the Linux Kernel Modules. This is used to verify whether the kernel module was compiled for the particular kernel version or not. ‘VERMAGIC_STRING’ is generated by the kernel configuration.

How to check kernel module in Linux?

Load a module Instead, use the modprobe command followed by the kernel module name. modprobe attempts to load the module from /lib/modules//kernel/drivers/ . This command will automatically check for module dependencies and load those drivers first before loading the specified module.

How does the modinfo command in Linux work?

The modinfo command extracts information from the Linux kernel modules given on the command line. If module name is not a file name, then the /lib/modules/kernel-version directory is searched — the same directory searched by modprobe when loading kernel modules.

How does modinfo extract information from Linux modules?

modinfo extracts information from the Linux kernel modules given on the command line. If module name is not a file name, then the /lib/modules/kernel-version directory is searched — the same directory searched by modprobe when loading kernel modules.

How to display kernel module information with modinfo?

The modinfo command shows the detailed information of a given Kernel module. By default, it lists the attributes of a Kernel module in the form of fieldname : value, for easy reading. To display the information of a Linux Kernel module, for example 88XXau, which is the TP-Link AC600 (Archer T2U Nano) Wireless adapter, run: $ modinfo 88XXau

What is the output of depmod in Linux?

Output resembles the following (note that the field name does not prefix the field values): depmod — Generate a list of kernel module dependencies and associated map files. insmod — Insert a module into the Linux kernel. lsmod — Show the status of Linux kernel modules.