ctskaw
Last Updated: February 25, 2016
·
1.179K
· skuro

Forgot to nohup(1)? Just use disown(1)

The use of nohup to run a process in an open (possibly remote) shell to avoid killing it at logout is pretty wildly famous. A less known builtin command is disown, which achieves the same result after you started the command, allowing you to "deamonize" processes on demand:

$ sh my_very_very_long_script.sh
^Z
[1]  + 7503 suspended  sh my_very_very_long_script.sh
$ bg
$ disown %1