Today I was messing around with my computer and wondered what would happen if I killed init
. I tried kill 1
, nothing happened. I tried kill -9 1
, nothing happened. I tried many very fatal signals, and all of them were ignored. I was finally able to attach to it with gdb and kill it that way. Now that I have killed PID 1, init
, I want to kill PID 0, the kernel scheduler. How would I go about doing this? gdb can't find the process so that method is out and I am stumped.
Also, yes, I know there is absolutely no practical purpose of doing this but this is just a PC, I trust the journaling capabilities of ext4 and I have backups, so I just want to mess around with it (and maybe learn a bit about the Linux kernel in the process.)
This is on Ubuntu 20.04.