Linux will automatically a child process by sending SIGINT when parent (a shell exit) ends. To avoid this you must detach the child from the parent.
- disown: Prevents a closing shell from sending SIGUP signals.
$ cmd & # or hit CTRL-Z to interrupt and bg $ gb  cmd & # disown is supported in bash and zsh, but shells like csh, tcsh, dash do not support it $ disown %1
$ nohup cmd & # nohupping backgrounded jobs is typically used to avoid terminating them when logging off from a remote SSH session $ cmd </dev/null &>/dev/null & or $ nohup cmd > foo.out 2> foo.err < /dev/null &
- tmux@wiki/gnu screen@wiki: can also detach a process from the current shell. It allows one to reattach to the process later on.
# run cmd detached from SIGHUP and in the background $ screen -A -m -d -S somename cmd &