bash 如何在 Mac OSX 上查看加载的内核模块?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11481813/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 02:45:30  来源:igfitidea点击:

How to see the loaded kernel modules on Mac OSX?

macosbashshelllinux-kernel

提问by 0x90

In Linux we have the lsmod. What is the equivalent of lsmodin Mac?

在 Linux 中,我们有lsmod. lsmod在 Mac 中相当于什么?

回答by Kevin Grant

As documented here: https://developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html

如此处所述:https: //developer.apple.com/library/mac/documentation/Porting/Conceptual/PortingUnix/compiling/compiling.html

"lsmodis not available on Mac OS X, but other commands exist that offer similar functionality." They list kextutil, kextstat, kextload, kmodunload(I think they mean kextunload). These commands have manpages on Mac OS X.

"lsmod在 Mac OS X 上不可用,但存在提供类似功能的其他命令。" 他们列出kextutil, kextstat, kextload, kmodunload(我认为他们的意思是kextunload)。这些命令man在 Mac OS X 上有页面。

回答by TJ Thind

If you want to know what kernel extensions are loaded on MacOS you use the kextstatcommand.

如果您想知道 MacOS 上加载了哪些内核扩展,请使用该kextstat命令。