modinfo 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

modinfo 命令安装:


-bash/zsh: modinfo: command not found

# Windows (WSL2)
sudo apt-get update sudo apt-get install kmod

# Debian
apt-get install kmod

# Ubuntu
apt-get install kmod

# Alpine
apk add kmod

# Arch Linux
pacman -S kmod

# Kali Linux
apt-get install kmod

# CentOS
yum install kmod

# Fedora
dnf install kmod

# Raspbian
apt-get install kmod

# Dockerfile
 dockerfile.run/modinfo

# Docker
docker run cmd.cat/modinfo modinfo

modinfo 命令补充说明:


modinfo 命令用于显示给定模块的详细信息。


modinfo 命令

modinfo 命令语法:


modinfo [options] filename [args]

modinfo 命令选项:


-a:显示模块作者;
-d:显示模块的描述信息;
-l:显示模块的许可信息;
-p:显示模块的参数信息;
-n:显示模块对应的文字信息;
-0:用ASCII码的0字符分割字段值,而不使用新行。

modinfo 命令参数:


模块名:要显示详细信息的模块名称。

modinfo 命令实例:


modinfo 显示 sg 模块的信息:

modinfo sg


filename:       /lib/modules/3.10.0-693.2.2.el7.x86_64/kernel/drivers/scsi/sg.ko.xz
alias:          char-major-21-*
version:        3.5.36
license:        GPL
description:    SCSI generic (sg) driver
author:         Douglas Gilbert
rhelversion:    7.4
srcversion:     A6EAA021125079672179A24
depends:        
intree:         Y
vermagic:       3.10.0-693.2.2.el7.x86_64 SMP mod_unload modversions 
signer:         CentOS Linux kernel signing key
sig_key:        C0:8B:35:53:41:76:0F:03:0A:64:E3:C5:50:E1:13:CD:47:77:1E:A9
sig_hashalgo:   sha256
parm:           scatter_elem_sz:scatter gather element size (default: max(SG_SCATTER_SZ, PAGE_SIZE)) (int)
parm:           def_reserved_size:size of buffer reserved for each fd (int)
parm:           allow_dio:allow direct I/O (default: 0 (disallow)) (int)

modinfo 命令仅列出指定的属性:

modinfo -F author|description|license|parm|filename kernel_module

modinfo 命令扩展阅读:




modinfo 命令评论

共收录到 507Linux 命令