6

Under Linux, if I issue a reboot command from the shell, what is the sequence of events that lead to the shell (e.g. bash) disconnecting?

I think it's one of the following, but not sure which:

  1. It log me out of the shell before it sends a reboot signal.
  2. It send the signal to reboot and the shell logs me out.
  3. It send the signal to reboot and the shell just terminates abruptly without going through a logout procedure.
4
  • 3
    Reboot causes the init daemon to send SIGTERM to all processes. – jordanm Mar 31 at 16:21
  • Is there some particular way it matters which one it is? – ilkkachu Mar 31 at 16:56
  • 1
    @jordanm I don't see any duplicates yet; would you consider posting an Answer? – Jeff Schaller Mar 31 at 16:58
  • 2
    Actually final behaviour with systemd is probably different than with sys-v init (observable difference: interactive shell history not lost or lost). OP should specify what is the init process. – A.B Mar 31 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.