Created
August 21, 2017 00:26
-
-
Save cotyembry/0b66ae9e02d683da490ac036b804964c to your computer and use it in GitHub Desktop.
Revisions
-
cotyembry created this gist
Aug 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ from: https://askubuntu.com/questions/8653/how-to-keep-processes-running-after-ending-ssh-session The best way is often the simplest. 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.