Do you often encounter situations where you connect to a Linux/unix machine via SSH or terminal putty, execute a program, a script, or a command, but now you need to close the SSH or terminal, because that program, script, or command is running, Once you close without doing any processing this process will be closed together, so half of the work is wasted, it is a pity!
Here's a way to get a running program, script, or command to go back to the background when you need to close the terminal, assuming your program, script, or command is executing, as you can do here:
1. Press CTRL + Z
2. Input command bg
3, input disown (may only see one or two letters in the input, do not think that no input, the direct return can be completed)
4. Exit
Reprinted from: http://blog.csdn.net/flm2003/article/details/8130210
Linux foreground program goes to background execution (closes terminal without killing command)