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.
More on Processes, Signals & systemd
What is the difference between a program, a process and a thread?BeginnerHow are new processes created in Linux?IntermediateWhat is a zombie process, and how do you get rid of it?IntermediateWhat is an orphan process?BeginnerExplain the process states shown in ps (R, S, D, T, Z).IntermediateWhy can't you kill a process in D state?Advanced