I want to run a process in a remote linux server and keep that process alive after close the putty terminal,
what is the correct command?
You have two options:
nohup some-command &
, which will run the command in the background, detach it from the console, and redirect its output into nohup.out
. It will swallow SIGHUPs that are sent to the process. (When you close the terminal or log out, SIGHUP is sent to all processes that were started by the login shell, and the default action the kernel will take is to kill the process off. This is why appending &
to put the process in the background is not enough for it to survive a logout.)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With