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?

6

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.