2

How can I start a job on a *nix system that will not exit when my session exits?

C. Ross
  • 31,137
  • 42
  • 147
  • 238
  • possible duplicate of http://stackoverflow.com/questions/285015/linux-prevent-a-background-process-from-being-stopped-after-closing-ssh-client – Ether Apr 10 '10 at 17:08

2 Answers2

2

nohup your_process &

newdayrising
  • 3,762
  • 4
  • 27
  • 31
2

Use the command nohup, and then add an ampersand (&) at the end to put the job in the background.

$ nohup ./fetch_command > fetch_log_file &

Then you can exit the shell and the job will continue running.

JSchaefer
  • 7,031
  • 4
  • 20
  • 10