Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.