What happens when you kill kernel_task on OS X? Is that even possible? I know that the system reboots because of kernel panic when you kill launchd, but I can't find any resources online and am afraid of trying to kill kernel_task.


You can't properly kill kernel_task. Activity Monitor doesn't allow you to kill kernel_task at all - neither as admin nor as root.

If you try to outwit kernel_task by using kill -9 0 or /bin/kill -9 0 as root you just kill yourself i.e. the first command kills bash (kill is an integrated command of bash) and the second command kills /bin/kill because in both cases the 0 is interpreted as me/yourself and not as kernel_task.

The man page for the system call kill (which is called by both kill and /bin/kill) explains that

If pid is zero:
    Sig is sent to all processes whose group ID is equal to the process group ID of
    the sender, and for which the process has permission; this is a variant of

This makes it basically impossible to even attempt to kill the process with PID 0.

  • Well said - it's the kernel that does the executions, so it's far easier to just shut down the OS instead of changing it (hot patch or not) to self-kill and then work out any engineering issues where processes that depend on the kernel now crash due to the change that has happened. This is also why kernel panics bring the system to an abrupt halt. – bmike Mar 12 '17 at 18:38

u CANT kill it cause its the kernel wich is basicley the core of a operating system wich also starts all applications and drivers and killing it wuld be the same as trying to remove ur whole body form your body its imposible cause u trying to remove something form itself wich is as imposible as gooing quicker then the speed of light while running compare it to trying to remove the apple of a apple with the same apple exept if it changes into a blackhole it cant disapear and since the blackhole is the apple its still not gone only way to kill kernel_task is by a manual overide of its data wich CRASHES IF EVEN ATTEMPTED CAUSE OF U ATTEMPTING TO REACH TO KERNEL SPACE AND WRITING OVER THE MOST IMPORTAND APPLICATION OF THE OS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .