I have a screen running with a number of sessions, and in one of them, I entered screen -D -m and now that session is just hung. I can't do an Escape, q, or Ctrl+C to terminate. Even after closing and resuming the screen screen -r screenName, this specific session is just in that same state.

How do I kill this session? Thanks!


screen -D -m starts a new session in a detached state without forking a new process. The command will not terminate until that new screen exits.

You can still put the command in the background with Ctrl+Z followed by bg, and then check what name it got with screen -ls (it will say (Detatched) at the end and also mention the time it was created). The name is the first word on one of the lines and will likely contain some digits and your hostname.

Attach to the session with screen -r name (where name is the name shown by screen -ls for the started session that you'd like to end) and exit from it.

You don't need to exit or detach from the original screen session to do any of these things.

  • cool thanks! i didn't realize i just have to look it up by screen -ls on the actual host that that session was in. – jaxarroyo Dec 11 '18 at 21:38

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.