Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ??

share|improve this question

migrated from stackoverflow.com Dec 24 '11 at 1:37

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

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

share|improve this answer
    
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 – user1113145 Dec 23 '11 at 9:33
    
-S works!! Thanks!! no idea how i missed that, re-read the manual 100 times .. – user1113145 Dec 23 '11 at 9:36

You must log in to answer this question.