As an example, let's say I want to run 3 projects, each having 2 scripts.

Option 1: Create 3 sessions in GNU Screen and open 2 windows under each session to run the scripts.

Option 2: Create 6 sessions and run each script in each session.

What are the benefits and drawbacks of each option?

My instinct would be option 2 as if one session fails, at least the entire project doesn't fail as would be the case under option 1.


The benefit of using just one screen and multiple windows within it is that it's easier to switch between the windows, and actually possible to e.g. see alerts for bells and to monitor the other windows for (in)activity.

Using multiple screen sessions requires more awkward juggling between them.

If you're worried about screen crashing, and don't really need the features it provides, you could also arrange the scripts to run in the background without screen. Either with something like nohup, or started directly from your init/service manager.

Anecdotally, I can't really remember screen crashing in the 10+ years I've used it. It does have a failure mode where the command running inside screen can effectively get stuck (or at least be prevented from printing) if the session gets disconnected. That can be fixed by setting nonblock 1 in screenrc.

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.