I saw many place introduce
screen to run background job stably even log out. They use
screen -dmS name
screen -h, this option means
-dmS name Start as daemon: Screen session in detached mode.
What is daemon? I don't understand.
I found that if I simply type
screen, I can enter automatically into a screen. After I run some command, and press
Ctrl+a d, and then log off. The job is still running fine. So is this simple approach OK? Do I really need
-dmS to make background job stable?
Let me try to give a summary:
Anything run in screen is safe to logging out (but you should detach the screen, not quit screen when you log out), no matter what the option you have set to screen.
-dmS is just an option convienient for submitting jobs in background noniteractively. That is
screen -dmS nameOfScreen command