الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

insmod

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

المستوى
لينكس اليومي
المجموعة
النواة والعتاد
يحتاج root
نعم
الحزمة
kmod
يُسمّى أيضًا
rmmod

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

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.

طريقة الكتابة

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

الخيارات 7

الأكثر استخدامًا

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.

أمثلة 10

$ مستخدم عادي# بصلاحية root (أو مع 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.

رموز الخروج

0Done.
1Error.

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man 8 insmod