6

When I need to start a background process on a low-importance server, I tend to use nohup:

nohup ./server.sh &

Most colleagues seem to prefer screen:

screen -D -R mydaemon
./mydaemon.sh
^A ^D

Are there any major differences in the effect of these two approaches? What are the benefits one way or the other?

1

1 Answer 1

7

Disadvantages of nohup are that you can't reconnect to the process after the parent exits, and you have to go through the extra steps of making sure the output is captured correctly. With screen or tmux, you can still interact with the shell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .