-------
The best way is often the simplest.
It was made specifically for this, it even logs stdout to nohup.log
If you want to "background" some already running tasks, then your best bet is to ctrl+z then run
then a quick
Keep in mind, both are bash specific. If you're not using bash, then the commands could be different.
----
Extracted from http://askubuntu.com/questions/8653/how-to-keep-processes-running-after-ending-ssh-session
nohup long-running-command &
It was made specifically for this, it even logs stdout to nohup.log
man nohup
If you want to "background" some already running tasks, then your best bet is to ctrl+z then run
bg
(this will background your most recent suspended task, allowing it to continue running)then a quick
disown
should keep the process running after you log out. screen
and others can do it, but that's not what they're for. I recommend nohup
for tasks you know your going to leave behind and bg
for tasks your already running and don't want to re-start. Keep in mind, both are bash specific. If you're not using bash, then the commands could be different.
----
Extracted from http://askubuntu.com/questions/8653/how-to-keep-processes-running-after-ending-ssh-session