Interview Prep/Linux/Processes, Signals & systemd

What does `nohup` do, and how is it different from `&` and `disown`?

IntermediateConceptProcesses, Signals & systemd
Answer

& runs a job in the background but it still belongs to the shell and receives SIGHUP when the terminal closes. nohup cmd & ignores SIGHUP and redirects output to nohup.out. disown removes an already-running job from the shell's job table so the shell will not send it SIGHUP. For anything long-lived, use a systemd unit, systemd-run, or tmux instead.

All Linux questions Roadmap: Linux

More on Processes, Signals & systemd