On multiple computers running Ubuntu 14.XX, I ran the command "killall init" as user, and was immediately logged out. I could log back in again without a problem. Why is this? What's going on behind the scenes?
Why does running `killall init` as user log me out
initkilllogout
Best Answer
On newer Upstart systems, a session init process is started when you login using the GUI. Since Ubuntu uses Upstart, there's an
init
process for your session. Test it out usingpstree -ps $$
in a terminal:So when you run
killall init
, you're not killinginit
PID 1 (because you don't have the privilege), but your sessioninit
, which would be PID 9526 in this example.Since this
init
is the governing process for your GUI session, killing it kills your session and therefore you are logged out.