Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I was unable to resume my screen session this morning, even after I killed the old screen -r session.

svtbuild@dvm-2:~/rfs$ screen -r 17757.pts-0.dvm-2
There is a screen on:
    17757.pts-0.dvm-2   (11/27/2012 04:49:19 PM)    (Attached)
There is no screen to be resumed matching 17757.pts-0.dvm-2.

After waiting for a while I was able to resume. How can I do this more reliably?

share|improve this question
From the screen manpage: screen -D -R. – ott-- Dec 10 '12 at 15:47
@ott-- If this is the solution, can you post it as an answer with a short explanation of the flags? – Bernhard Dec 10 '12 at 16:19
@ott, that actually worked. Thanks. You should post an answer and I'll accept. – grokus Dec 11 '12 at 1:10
up vote 7 down vote accepted

From the screen manpage:

screen -D -R
Attach here and now. In detail this means: If a session is running, then reattach.
If necessary detach and logout remotely first. If it was not running create it
and notify the user.

As mentioned for the options -D -RR, unless you know the status of your session(s), you should check it with screen -list.

share|improve this answer

Your Answer


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

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