linux – 为什么“lsmod | wc -l“不等于”ls / sys / module | wc -l“
发布时间:2020-05-24 00:27:42 所属栏目:Linux 来源:互联网
导读:为什么这两个命令会返回不同的结果? lsmod | wc -l100ls /sys/module | wc -l138 lsmod列出了所有加载的动态模块. / sys / module中的条目对应于内核中内置的动态模块和模块(并且具有需要可访问的参数),而不是动态加载.例如: [michael@brazzers:~]$ls -d /s
|
为什么这两个命令会返回不同的结果? lsmod | wc -l 100 ls /sys/module | wc -l 138 解决方法lsmod列出了所有加载的动态模块./ sys / module中的条目对应于内核中内置的动态模块和模块(并且具有需要可访问的参数),而不是动态加载.例如: [michael@brazzers:~]$ls -d /sys/module/ip_tables/ /sys/module/ip_tables/ [michael@brazzers:~]$lsmod |grep ^ip_tables ip_tables 26995 3 iptable_filter,iptable_mangle,iptable_nat [michael@brazzers:~]$grep CONFIG_NF_NAT_IPV4 /boot/config-3.8.0-30-generic CONFIG_NF_NAT_IPV4=m 您可以在此处看到iptables模块配置为动态模块.相比较: [michael@brazzers:~]$ls -d /sys/module/apparmor/ /sys/module/apparmor/ [michael@brazzers:~]$lsmod |grep ^apparmor [michael@brazzers:~]$grep APPARMOR /boot/config-3.8.0-30-generic CONFIG_SECURITY_APPARMOR=y 而apparmor是内置的. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – 我可以使用SSH密钥身份验证登录到具有不同用户名的
- linux – 使用命令行确定硬件配置
- linux – 如何解释这个smartctl(smartmon)数据
- linux – 目前我的ZFS重复数据删除表有多大?
- 为什么“shutdown -r now”的行为与Debian Linux上的“rebo
- linux – 黑客绕过iptables
- linux – 如何在Windows Server 2008上配置freeSSHd以便我可
- ruby – 尝试删除Centos中受保护的yum
- linux – CVS Diff只输出修改过的文件?
- linux – 如何排除Apache Mod_proxy的URL?
