Reattaching to screen - Linux

1

We run several screen instances from one box, eg. :

27185.pts-53.CentOS-57-64-minimal (Detached)

27209.pts-53.CentOS-57-64-minimal (Detached)

27281.pts-53.CentOS-57-64-minimal (Detached)

Is there a way to ‘name’ a screen id, so instead of having to remember the exact PID, i use screen -x 1 for pid 27185, screen -x 2 for pid 27209 and screen -x 3 for pid 27281 ??

user1113145

Posted 2011-12-23T09:24:27.993

Reputation:

Answers

3

When you start the screen, you can use -S to set the sessionname (Source: http://linux.die.net/man/1/screen )

After you are in screen, you can rename the Session by entering the command mode: Ctrl+a :sessionname

You can read about the : here: http://www.delorie.com/gnu/docs/screen/screen_6.html

and the list of available commands is here: http://www.delorie.com/gnu/docs/screen/screen_9.html

NoLifeKing

Posted 2011-12-23T09:24:27.993

Reputation: 146

It is not possible to reattach using the title as we do set the -t for every instance. Trying -S now, will update you in a minute – None – 2011-12-23T09:33:32.853

-S works!! Thanks!! no idea how i missed that, re-read the manual 100 times .. – None – 2011-12-23T09:36:06.220