macoskernel

Invoke Mac Kernel Panic?


So i am lookin for some source code to crash the mac kernel. I found crashme for debain linux but that does not work for the mac kernel. So i was wondering if anyone knows where i can find a command-line utility or some source code to invoke the mac kernel panic? This would be a huge help, thanks.


Solution

  • Apple has a tech note about how to do this. The short way to do it is with this command, sudo dtrace -w -n "BEGIN{ panic();}", run from the terminal.

    Update 2020: As noted by Wei Shen in the comments, you'll need to disable SIP to make this work in modern versons of macOS.