系统环境:Red Hat Enterprise Linux Server release 6.0
[root@localhost huage]# lsmod //列出当前系统已加载的模块
Module Size Used by
usb_storage 39114 0
cdrom 34035 1 sr_mod
。。。。。。
。。。。。。
。。。。。。
[root@localhost huage]# lsmod |grep usb
usb_storage 39114 0
[root@localhost huage]# lsmod |grep usb_storage
usb_storage 39114 0
[root@localhost huage]# lsmod |grep usb-storage
//使用grep过滤输出时,下划线和中划线意义完全不一样
[root@localhost huage]# modprobe -r usb_storage //删除模块;删除模块时需要加‘-r’参数
[root@localhost huage]# lsmod |grep usb
[root@localhost huage]# modprobe usb-storage //添加模块;添加模块时,直接加模块名就可以了
[root@localhost huage]# lsmod |grep usb
usb_storage 39114 0
//使用modprobe命令添加或删除模块时,‘_’和‘-’没有区别,即下划线和中划线没有区别
[root@localhost huage]# man modprobe
DESCRIPTION(只节选了部分)
modprobe intelligently adds or removes a module from the Linux
kernel: note that for convenience, there is no difference between
_ and - in module names. modprobe looks in the module directory
/lib/modules/?.name -r?. for all the modules and other files,
except for the optional /etc/modprobe.conf configuration file and
/etc/modprobe.d directory (see modprobe.conf(5)). modprobe will
also use module options specified on the kernel command line in
the form of <module>.<option>.
-r --remove
This option causes modprobe to remove rather than insert a
module. If the modules it depends on are also unused, mod-
probe will try to remove them too. Unlike insertion, more
than one module can be specified on the command line (it
does not make sense to specify module parameters when
removing modules).
There is usually no reason to remove modules, but some
buggy modules require it. Your kernel may not support
removal of modules.
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/1165.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
打赏微信支付宝扫一扫,打赏作者吧~
休息一下~~