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

modinfo

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

المستوى
امتحان RHCSA
المجموعة
النواة والعتاد
يحتاج root
لا
الحزمة
kmod

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

ماذا يفعل

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.

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

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

الخيارات 11

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

-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.

أمثلة 10

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

رموز الخروج

0Done.
1Module not found or error.