2

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

C. Ross
  • 29,985
  • 40
  • 142
  • 233
  • 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,732
  • 3
  • 25
  • 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
  • 6,651
  • 4
  • 18
  • 10