We used gnu screen a lot in the office and sometimes if I don't take note, I end up getting lost as to what screen session I already am in.
So my question is, how do you know what screen session you're in? Do you have a way to check?
CLARIFICATION: What I need to know is when I do a:
~$ screen -ls
and I see something like:
There is a screen on:
4732.work_Sept42012 (Attached)
3551.web01 (Attached)
5521.mysql01 (Attached)
1255.tomcat05 (Detached)
3326.oracle15 (Attached)
1 Socket in /tmp/uscreens/S-icasimpan.
How do I know if I am currently connected to any of the attached session?
Thanks in advance.
In addition to the sessionname
screen command, screen sets the STY
environment variable for processes it starts. You can check the value of this variable from a shell:
$ echo $STY
5521.mysql01
$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With