1

I am running multiple screens from one ssh connection, when I list all of the screens via screen -ls the names are not very descriptive and when I have multiple screens it becomes hard to remember what is running on each. Does anyone know how to name these sessions (preferably when creating the screen).

Dale K
  • 25,246
  • 15
  • 42
  • 71
Aly
  • 15,865
  • 47
  • 119
  • 191
  • This question surely belongs on ServerFault? – Frank Shearar Mar 08 '10 at 12:42
  • 2
    Possible duplicate of [How to assign name for a screen?](https://stackoverflow.com/q/3202111/608639), [How to rename a gnu screen session](https://unix.stackexchange.com/q/27780/56041) on [Unix & Linux Stack Exchange](http://unix.stackexchange.com/), [Rename screen session](https://superuser.com/q/370510/173513) on [Super User](http://superuser.com/), etc. – jww Apr 02 '19 at 13:40

2 Answers2

5

You can make use of the -S flag:

screen -S name_for_this_session
Alan Haggai Alavi
  • 72,802
  • 19
  • 102
  • 127
0
screen -S sessionname

When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for "screen -list" and "screen -r" actions. It substitutes the default [tty.host]

check this http://aperiodic.net/screen/quick_reference for more info...

vector
  • 493
  • 1
  • 5
  • 14