1

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!

1 Answer 1

1

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.

1
  • 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. Commented Dec 11, 2018 at 21:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.