云网牛站
所在位置:首页 > Linux常用命令大全 > 更多实用命令 > modinfo命令

modinfo命令

modinfo命令相关的命令有:lsmod,modprobe,insmod,rmmod,depmod.

功能

显示内核模块的信息。

用法

modinfo [ -0 ] [ -F field] [modulename | filename ... ]
modinfo -V
modinfo -h

描述

modinfo列出Linux内核中命令行指定的模块的信息。若模块名不是一个文件名,则会在/lib/modules/version 目录中搜索,就像modprobe一样。

modinfo默认情况下,为了便于阅读,以下面的格式列出模块的每个属性:fieldname : value。

选项

-V --version 版本
-F --field 仅在一行上显示field值,这对于脚本较为有用。常用的field有:author, description, licence, param, depends, alias, filename。
-0 --NULL 使用'/0'字符分隔field值,而不是一个新行。对脚本比较有用。
-a -d -l -p -n 这些分别是author, description, license, param ,filename的简短形式。

实例

[root@localhost download]# modinfo ext3  #查看ext3模块的详细信息
filename:/lib/modules/4.3.18-194.26.1.el5/kernel/fs/ext3/ext3.ko
license:GPL
description:Second Extended Filesystem with journaling extensions
author:Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others
srcversion:4892892BC4F1C4BCF3E12BD
depends:jbd
vermagic:4.3.18-194.26.1.el5 SMP mod_unload 686 REGPARM 4KSTACKS gcc-4.8
module_sig:883f3504cd99273f757f25e1424eae11210da09

相关命令