If already running
ctrl z pause
jobs See the id of the suspended task
bg id
disown id #Note: Without this sentence, the process will receive SIGHUP when the terminal ends. The default operation corresponding to this signal is to end the process
In addition to nohup, you can also use setsid, but the best thing is to use something like screen.
This is because ssh has a time limit. If the client does not respond within a period of time, the server will disconnect.
Add to /etc/ssh/ssh_config
ServerAliveInterval 60
One line and that’s it
Ready to run
nohup xxx &
If already running
ctrl z pause
jobs See the id of the suspended task
bg id
disown id #Note: Without this sentence, the process will receive SIGHUP when the terminal ends. The default operation corresponding to this signal is to end the process
In addition to nohup, you can also use setsid, but the best thing is to use something like screen.
What lz needs is tmux or screen
Try nohup
http://www.21andy.com/blog/20071121/6...
Install a screen
See: http://www.ibm.com/developerworks/cn/...
Add &
at the end of the scriptFind something to hold down the keyboard. . .
tmux or screen
byobu is just a beautified wrapper for tmux/screen
This is because ssh has a time limit. If the client does not respond within a period of time, the server will disconnect.
Add
to /etc/ssh/ssh_config ServerAliveInterval 60
One line and that’s it
byobu you deserve it! Easier to use than screen
setsid - run a program in a new session