How to list all loadable kernel modules?

  • By default modprobe loads modules from kernel subdirectories located in the /lib/modules/$(uname -r) directory. Usually all files have extension .ko, so you can list them with

    find /lib/modules/$(uname -r) -type f -name '*.ko'
    

    or, taking into account compressed files:

    find /lib/modules/$(uname -r) -type f -name '*.ko*'
    
  • Each module can be also loaded by referring to its aliases, stored in the /lib/modules/$(uname -r)/modules.alias (and modules.alias.bin).

  • However, to load a modules successfully modprobe needs their dependencies listed in the file /lib/modules/$(uname -r)/modules.dep (and a corresponding binary version modules.dep.bin). If some module is present on the system, but is not on the list, then you should run a command depmod which will generate such dependencies and automatically include your module to modules.dep and modules.dep.bin.

  • Additionally, if the module is successfully loaded it will be listed in the file /proc/modules (also accessed via command lsmod).


Type modprobe and press tab, the autocomplete list should contain all the loadable modules


There is lsmod command of kmod package in Arch Linux what lists and shows the status of Linux kernel modules that contains other useful commands such as modinfo, rmmod modprobe too.

To list all binaries provided by the package you can type:

pacman -Ql kmod | grep /bin/ --color=always

, and you can also check for the owner package of a binary with pacman -Qo lsmod.


Q switch is to query locally installed packages (unlike S to synchronize, ie. to check remotely).