Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

modinfo

Show information about a kernel module: file, description, license, dependencies, aliases and parameters.

Niveau
RHCSA-examen
Groep
Kernel en hardware
Root nodig
Nee
Pakket
kmod

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Wat het doet

modinfo NAME reads the module file (also when it is not loaded). The parm: lines list the parameters you can set with modprobe or in /etc/modprobe.d/. The alias: lines show which hardware IDs the module supports.

Zo schrijf je het

modinfo [OPTION]... MODULE|FILE...

Opties 11

Meest gebruikt

-p, --parameters
Only the parameters.
-F, --field FIELD
Only one field: filename, description, author, license, depends, alias, parm, version, vermagic …
-d, --description
Only the description.
-a, --author
Only the author.
-l, --license
Only the license.
-n, --filename
Only the file name.
-k KERNEL
Use the modules of another kernel version.
-b, --basedir DIR
Use another root for /lib/modules.
-0, --null
Separate fields with NUL.
-V, --version
Show the version.
-h, --help
Show help.

Voorbeelden 10

$ als gewone gebruiker# als root (of met sudo)

  1. 1All information

    modinfo xfs
    filename:       /lib/modules/6.12.0-55.9.1.el10_0.x86_64/kernel/fs/xfs/xfs.ko.xz
    description:    SGI XFS with ACLs, security attributes, realtime, quota, no debug enabled
    license:        GPL

    Plus depends, signature and more.

  2. 2Parameters of a module

    modinfo -p loop
    max_loop:Maximum number of loop devices (int)
    max_part:Maximum number of partitions per loop device (int)

    Set them with options loop max_part=8.

  3. 3Only the file

    modinfo -n vfat

    Where the .ko file is.

  4. 4Dependencies

    modinfo -F depends vfat
    fat

    modprobe loads these first.

  5. 5Hardware IDs a driver supports

    modinfo -F alias e1000e | head

    Match with lspci -nn IDs.

  6. 6Is the module signed? (Secure Boot)

    modinfo -F signer xfs

    Red Hat signs its modules; unsigned ones do not load with Secure Boot.

  7. 7Current value of a parameter

    cat /sys/module/loop/parameters/max_part

    modinfo shows the options; /sys shows the active value.

  8. 8Modules of another kernel

    modinfo -k 6.12.0-55.el10.x86_64 xfs | head -2

    Check before you boot an older kernel.

  9. 9Description only

    modinfo -d usb-storage

    Short text.

  10. 10License (tainted kernel check)

    modinfo -l nvidia 2>/dev/null

    Non-GPL modules taint the kernel; support may ask.

Exitcodes

0 :: Done. 1 :: Module not found or error.