https://www.halfbit.de/howtos/keep-ssh-process/
ctrl+z
bg
disown
exit
ssh
ps- -ef
Keep a process running after exiting SSH session
- In SSH, launch the process you wish to keep in background, for example
cp -Rv /mnt/red/*.* /mnt/black
- Suspend the process by pressing
Ctrl-Z
. - Resume suspended process in background by typing
bg
. - Detach the process from SSH session by typing
disown
. - Exit the SSH by typing
exit
.
The process will continue running in background.
🍭 Typing
fg
at step (3) will bring the process back to foreground.
沒有留言:
張貼留言