I'm in a Linux terminal and created multiple screens.

When I try screen -list, I get the following:

prem@ubuntu:~$ screen -list
There are screens on:
    5110.work1  (11/15/2013 02:01:53 PM)    (Detached)
    4807.work1  (11/15/2013 01:54:11 PM)    (Attached)
    4621.work2  (11/15/2013 01:51:03 PM)    (Attached)
    2611.work1  (11/15/2013 11:31:56 AM)    (Attached)
4 Sockets in /var/run/screen/S-prem.

But when I want to navigate to screen work1, I get the following:

prem@ubuntu:~$ screen -r work1
There are screens on:
        5110.work1      (11/15/2013 02:01:52 PM)        (Attached)
        4807.work1      (11/15/2013 01:54:10 PM)        (Attached)
        2611.work1      (11/15/2013 11:31:55 AM)        (Attached)
There is no screen to be resumed matching work1.

What does the -r command do here? Did it really navigate or how do I go to 5110.work1 screen and confirm its that screen?

  • I know it is not what you asked for, but have you tried tmux? You can attach into other sessions with attach-session -t <name>, the only drawback that I have noticed is the lack of support for serial ports, screen does have it, tmux does not. Nov 15 '13 at 19:48

The -r option stands for resume. So your command means resume the work session, to which your pc is replying: there are multiple work session, which one do you mean?

The correct way to restart the second work session, for instance, is by means of

 screen -r 4807

and likewise for the other sessions. When you want to move to a different session, you again issue the usual command Ctrl a+ d, then select again the session you wish to move to. If you already know you want to move on to the next/previous session in the list, you use Ctrl a+n/Ctrl a+p, respectively.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.