GetFree GetFree -4 years ago 125
Linux Question

Prevent a background process from being stopped after closing SSH client

I'm working on a linux machine through SSH (Putty).
I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file.
To my surprise, that doesn't work. As soon as I close the Putty window, the process is stopped.

How can I prevent that from happening??

Answer Source

Check out the "nohup" program.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download