2023年5月2日 星期二

Keep a process running after exiting SSH session

 

https://www.halfbit.de/howtos/keep-ssh-process/


ctrl+z
bg
disown
exit
ssh
ps- -ef



Keep a process running after exiting SSH session

  1. In SSH, launch the process you wish to keep in background, for example
cp -Rv /mnt/red/*.* /mnt/black
  1. Suspend the process by pressing Ctrl-Z.
  2. Resume suspended process in background by typing bg.
  3. Detach the process from SSH session by typing disown.
  4. 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.

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...