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

insmod

Load one module file into the kernel (insmod) or remove a loaded module (rmmod) — without dependency handling.

Niveau
Dagelijks Linux
Groep
Kernel en hardware
Root nodig
Ja
Pakket
kmod
Ook
rmmod

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

Wat het doet

insmod FILE loads exactly that .ko file; it does not load dependencies or read /etc/modprobe.d. rmmod NAME removes a module that has no users. In daily work use modprobe and modprobe -r instead; insmod is for testing your own or special modules.

Zo schrijf je het

insmod FILE [PARAMETER=VALUE]...
rmmod [-f] [-s] [-v] MODULE...

Opties 7

Meest gebruikt

insmod

FILE
The path of the module file (.ko, .ko.xz).
PARAMETER=VALUE
Module parameters.

rmmod

-f, --force
Remove even if in use (very dangerous; may crash).
-s, --syslog
Errors to syslog.
-v, --verbose
Verbose.
-V, --version
Show the version.
-h, --help
Show help.

Voorbeelden 10

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

  1. 1Load a file

    insmod /lib/modules/$(uname -r)/kernel/fs/fat/fat.ko.xz

    Dependencies must be loaded first by hand.

  2. 2Error because of a missing dependency

    insmod /lib/modules/$(uname -r)/kernel/fs/fat/vfat.ko.xz
    insmod: ERROR: could not insert module …: Unknown symbol in module

    modprobe vfat would load fat automatically.

  3. 3Remove a module

    rmmod vfat

    Must not be in use.

  4. 4Module in use

    rmmod xfs
    rmmod: ERROR: Module xfs is in use

    Unmount the file systems first.

  5. 5With parameters

    insmod ./mydriver.ko debug=1

    Testing your own driver.

  6. 6Find the file of a module

    modinfo -n vfat

    Then insmod that file.

  7. 7Prefer modprobe

    modprobe vfat; modprobe -r vfat

    Handles dependencies and config.

  8. 8Check signature enforcement (Secure Boot)

    mokutil --sb-state

    With Secure Boot, unsigned modules are refused.

  9. 9Log of module loading

    journalctl -k | grep -i module

    Load and taint messages.

  10. 10Check the kernel taint state

    cat /proc/sys/kernel/tainted
    0

    Not 0 = an unsigned, out-of-tree or forced module was loaded.

Exitcodes

0Done.
1Error.

Volledige handleiding

Deze pagina legt het commando uit in eenvoudige woorden. De originele handleiding heeft elk detail.

In je terminal: man 8 insmod