命令介绍

▪ 简介
▪ 内容

2相关信息

▪ 参数
▪ 操作

1命令介绍编辑

简介

Linux命令:modprobe 。
功能说明:自动处理可载入模块。
语  法:modprobe [-acdlrtvV][--help][模块文件][符号名称 = 符号值]。
补充说明:modprobe可载入指定的个别模块,或是载入一组相依的模块。modprobe会根据 depmod所产生的相依关系,决定要载入哪些模块。若在载入过程中发生错误,在modprobe会 卸载整组的模块。

内容

1、modprobe 命令是根据 depmod -a的输出/lib/modules/version/modules.dep来加载全部的所需要模块。
2、删除模块的命令是:modprobe -r filename。
3、系统启动后,正常工作的模块都在/proc/modules文件中列出。使用lsmod命令也可显示相同内容。
4、在 内核中有一个“Automatic kernel module loading"功能被编译到了内核中。当用户尝试打开某类型的文件时, 内核会根据需要尝试加载相应的模块。/etc/modules.conf或 /etc/modprobe.conf文件是一个自动处理 内核模块的控制文件。

2相关信息编辑

参数

-a或--all  载入全部的模块。
-c或--show-conf  显示所有模块的设置信息。
-d或--debug  使用排错模式。
-l或--list  显示可用的模块。
-r或--remove  模块闲置不用时,即自动 卸载模块。
-t或--type  指定模块类型。
-v或--verbose  执行时显示详细的信息。
-V或--version  显示版本信息。
-help  显示帮助。

操作

insmod 与 modprobe 都是载入 kernel module,不过一般差别于 modprobe 能够处理 module 载入的相依问题。
比方你要载入 a module,但是 a module 要求系统先载入 b module 时,直接用 insmod 挂入通常都会出现错误讯息,不过 modprobe 倒是能够知道先载入 b module 后才载入 a module,如此相依性就会满足。
不过 modprobe 并不是大神,不会厉害到知道 module 之间的相依性为何,该程式是读取 /lib/modules/2.6.xx/modules.dep 档案得知相依性的。而该档案是透过 depmod 程式所建立。
The modprobe and depmod utilities are intended to make a Linux modular kernel more manageable for all users, administrators and distribution maintainers. Modprobe uses a "Makefile"-like dependency file, created by depmod, to automatically load the relevant module(s) from the set of modules available in predefined directory trees. Modprobe is used to load a single module, a stack of dependent modules, or all modules that are marked with a specified tag. Modprobewill automatically load all base modules needed in a module stack, as described by the dependency file modules.dep. If the loading of one of these modules fails, the whole current stack of modules loaded in the current session will be unloaded automatically. Modprobe has two ways of loading modules. One way (the probe mode) will try to load a module out of a list (defined by pattern). Modprobe stops loading as soon as one module loads successfully. This could be used to autoload one Ethernet driver out of a list. The other way modprobe can be used is to load all modules from a list. With the option -r, modprobe will automatically unload a stack of modules, similar to the way rmmod -r does. Note that using just modprobe -r will clean up unused autoloaded modules and also perform the pre-and post-remove commands in the configuration file /etc/modules, /etc/modprobe.d/*. Combining the options -l and -t lists all available modules of a certain type. Option -c will print the currently used configuration (default + configuration file). To do autoclean every 2 minutes:
'''/2 ''' * ''' ''' test -f /proc/modules && /sbin/modprobe -r
词条标签:
LINUX linux命令 linux

modprobe命令介绍相关推荐

  1. modprobe 命令

    1 命令介绍 编辑 简介 Linux命令:modprobe . 功能说明:自动处理可载入模块. 语 法:modprobe [-acdlrtvV][--help][模块文件][符号名称 = 符号值]. ...

  2. 第五课:系统目录及ls·文件类型及alias命令介绍

    1.上过一次我们学习了单用户和救援模式及服务器秘钥登录等操作,而我们最终的目的还是要操作和使用linux系统,所以我们今天先初步学习linux的基本命令如下: 一·目录介绍        ls命令介绍 ...

  3. puppet子命令介绍

    puppet子命令介绍 # puppet -V                //查看puppet的版本 # puppet help              //查看puppet支持的一些子命令 # ...

  4. linux系统防火墙相关问题及常用命令介绍

    今天介绍关于linux系统防火墙:centos5.centos6.redhat6系统自带的是iptables防火墙,centos7.redhat7自带firewall防火墙,ubuntu系统使用的是u ...

  5. linux vim编辑文本是 m,linux基础命令介绍四:文本编辑 vim

    本文介绍vim(版本7.4)的一般用法 vim是功能强大的文本编辑器,是vi的增强版. vim [options] [file ..] 使用vim编辑一个文件的最常用命令就是: vim file 其中 ...

  6. 常见网络命令介绍及使用

    常见网络命令介绍及使用 ping 介绍 参数说明 使用例子 ipconfig 介绍 参数说明 使用例子 tracert 介绍 参数说明 使用例子 netstat 介绍 参数说明 使用例子 route ...

  7. linux route 刷新_linux基础命令介绍十五:推陈出新

    本文介绍ip.ss.journalctl和firewall-cmd,它们旨在代替linux中原有的一些命令或服务. 1.ip ip [OPTIONS] OBJECT COMMAND ip是iprout ...

  8. 查看MySQL数据库表的命令介绍

    如果需要查看MySQL数据库中都有哪些MySQL数据库表,应该如何实现呢?下面就为您介绍查看MySQL数据库表的命令,供您参考. 进入MySQL Command line client下 查看当前使用 ...

  9. linux学习-简单命令介绍及安装VMware Tools

    常用简单命令介绍 ethernet以太网 pts:模拟终端 图形界面: Ctrl+Alt+F1 字符界面:Ctrl+Alt+F2-F6 切换虚拟终端:(本机操作) # chvt 1-6 关闭图形界面, ...

最新文章

  1. c语言中的常用函数的使用,C语言的常用库函数使用方法分析及用途
  2. 030_CSS外边距合并
  3. 使用Pycharm创建一个Django项目
  4. 最新发布丨游戏市场“超预期”增长背景下,如何加速产品精品化 运营精细化?...
  5. poj3111 选取物品(二分+贪心)
  6. Java中instanceof与getClass的区别
  7. android迷宫源代码,迷宫 c++源代码(Maze c++ source code).doc
  8. Redis学习(1)NoSQL非关系型数据库、Redis概述、Linux安装Redis
  9. rfid 物流业务信息系统介绍
  10. 删除计算机中的云u盘,win10系统删除360云u盘图标的方法
  11. 你要的电子书下载网站
  12. 关于几种获取iOS设备UDID典型方式的技术探讨
  13. 六度分离理论在社会工程学中的应用
  14. Eclipse设置运行内存大小
  15. 『教师节』程序猿用文心大模型带你一键加速祝福,祝老师们节日快乐
  16. nginx中配置root和alias的区别
  17. 华为发布《智能世界2030》报告;金唯智母公司Brooks Automation将以30亿美金出售半导体业务 | 全球TMT...
  18. Salesforce触发器面试题
  19. 【中文】【吴恩达课后编程作业】Course 5 - 序列模型 - 第三周作业 - 机器翻译与触发词检测
  20. 对C语言中警告(warning)的处理方法

热门文章

  1. Android 12系统源码_SystemUI(八)SystemUIVisibility属性
  2. Ubuntu 20.04自动挂载NFS失败
  3. 3.3 典型交易流程
  4. 微信小程序--云开发学习
  5. web学习第七天:来自倔驴的怒吼——生理年龄不代表技术年龄
  6. Python实用秘技,复杂zip文件的解压
  7. 【C语言】c语言中的数组和字符串
  8. ❤️熬夜爆肝十万字❤️Java最简单最全入门基础知识(一)(小白必备--推荐小白收藏)❤️
  9. Linux如何带压缩密码的7z,Linux 压缩和解压 7z
  10. 【CodeForces】【DP】14E Camels