prevent process from terminating when closing termial
772
i am working on a Linux box (via ssh), which is currently completing a very time-consuming task. How can I go to sleep (close my local terminal windows) without interrupting the execution of that task?
The best way would be to use screen to create a detatchable screen run your command then detach, you can then close the original session without issue. The oldschool way would be to use nohup and send it to the background i.e. nohup <command> <args> &
If you forgot to use nohup or screen, and you are using bash as your shell, do the following:
Not as useful as screen (especially when the process outputs something), but nice to use when a process unexpectedly takes a long time.
The best way would be to use screen to create a detatchable screen run your command then detach, you can then close the original session without issue. The oldschool way would be to use nohup and send it to the background i.e.
nohup <command> <args> &