What Islsmod?

The main advantage of using such modules is their modularity and granularity of them.

it’s possible for you to think about Kernel modules as plugins in other software.

Tux mascot jumping from Windows to Linux.

There is little difference between a plugin in other software and Linux Kernel modules.

We can see from the output provided what AHCI Linux Kernel modules are currently available.

Otherwise, the output looks a bit cryptic and not very descriptive.

synology nas

Let’s trylsmodinstead now.

Here we usedlsmod, a tool with no options, and usedgrepto grab multiple outcomes of interest.

modinfo ahci -F ‘author’

Here we used themodinfocommand to find out more information about theahciLinux Kernel module.

Article image

This is output is quite verbose as it includes signing key data etc.

We could have also usedgrepsimilarly as we did earlier to select both pieces of information in a single command.

Checkoutman modinfoto see all available options.

Viewing the contents of /proc/modules

We also looked at how to obtain more information about a specific module by using themodinfocommand in Linux.

Using lsmod to list the contents of /proc/modules in a better format and grepping for a particular module

Using the modinfo tool with the -F (field) option to select specific fields only

Using the modinfo tool in combination with grep to select multiple fields at once