OS X kexts knowhow

I have some Mac OS Xs around me (Intel and PPC ones as well), and usually I find the opportunity to create a nice kernel panic :] But I always forget how to list the already loaded kernel extensions:

kextstat

To load a kernel extension, type:

kextload /System/Library/SomeCool.kext

to unload a kext, type:

kextunload /System/Library/SomeCool.kext

If you want to replace any kexts, just simply copy over as root (i usually do it in midnight commander) and after say:

chmod -R 755 /System/Library/Extensions/SomeCool.kext

chown -R root:wheel /System/Library/Extensions/SomeCool.kext

and clear the kernel cache:

kextcache -k /System/Library/Extensions/

2 Responses to “OS X kexts knowhow”

  1. Hrissan says:

    BTW this commands will not work - kext is not ordinary file, it is a bundle. So you need to set permissions not to kext itself, but also to files inside it.

    The most simple way to do this is just run Disk Utility and make “Repair permissions” on your boot volume.

Leave a Reply