After doing

screen -S foo
screen -S bar
screen -ls

I see two screens: 1234.foo and 5678.bar (both Attached).

How can they be both attached, as I'm only in one at a time? (Presumably the last one I started?) Perhaps I misunderstand the concept, what does 'Attached' or 'Detached' mean?

Now, when I press: Ctrl+A " to get a list of screens, I only see ONE entry: 0 bash.

Perhaps I misunderstand this concept as well, shouldn't there be two screens?

When I do screen -ls it still shows two screens, both still Attached. How do I know which one I'm currently in?

  • Related: askubuntu.com/questions/980910/… ?
    – Videonauth
    Dec 3, 2017 at 1:45
  • @Videonauth Thanks, but what does 'attached' or 'detached from your current screen session' mean, exactly? I would assume I'm working on one screen at a time, so I'm attached to that one, and the rest is detached. But in my example above, they are both attached even though I am in only one of them at a time? (I'm not using split screen layout or anything)
    – RocketNuts
    Dec 3, 2017 at 11:04
  • @Videonauth Also, would you know why Cltr+A " shows only one entry (0 bash) even though I have two sessions? And can I see in which one I am currently working? For example if I named them "foo" and "bar", can I see if I'm currently in the foo or bar session?
    – RocketNuts
    Dec 3, 2017 at 11:06
  • @Videonauth Sorry maybe I'm just missing a trivial point here, put exactly what does "attached to you" or "associated with you" mean in this context? If I start a screen session, start some process there, detach from it, and then kill my ssh, the process keeps running (I understand this is the purpose of screen). However if I don't detach, if I'm actively in the screen session (or reattached to it) and then kill my ssh, the process still keeps running: if I reconnect and do screen -list they are both there, including the one I was just attached to when killing my the ssh connection.
    – RocketNuts
    Dec 3, 2017 at 11:56
  • By the way, screen -list shows both sessions: 1234.foo and 5678.bar, both Attached. I can't seem to find a way to tell in which I am currently (or perhaps in neither).
    – RocketNuts
    Dec 3, 2017 at 11:57


Your Answer

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

Browse other questions tagged or ask your own question.