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?
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 03 '17 at 11:06screen -list
they are both there, including the one I was just attached to when killing my the ssh connection. – RocketNuts Dec 03 '17 at 11:56screen -list
shows both sessions:1234.foo
and5678.bar
, both Attached. I can't seem to find a way to tell in which I am currently (or perhaps in neither). – RocketNuts Dec 03 '17 at 11:57$ echo $STY
will show you the PID and session name (if you started withscreen -S
. It will be empty if you're not attached. – Steven P Jan 15 '24 at 04:22