multiple terminals (screen) - already attached

Programming Nov 19, 2017

I described the basic usage of Screen in one of my last posts. I also mentioned a problem when using this tool.

In some cases, your terminal session may terminate, and so does your screen session. If you log in again and want to resume the screen, you probably get the error "screen is already attached" or "There is no screen to be resumed matching X". Follow the instruction to resume your screen session again.

How to detach an attached screen?

The initial situation:

screen -list
There are screens on:
25109.pts-1 (Attached)
25097.pts-1 (Detached)

Here you can see, that the first screen session is still attached.

The flag -D will detach and logout the remote.

screen -D 25109

You are now able to resume the screen again.

Please comment below, if you have any questions.

Tested on:

  • OS: CentOS 7
  • Screen: 4.01.00devel




Howdy! I'm Stefan and I am the main author of this blog. If you want know more, you can check out the 'About me' page.

Impressum | Data Privacy Policy | Disclaimer
Copyright: The content is copyrighted and may not be reproduced on other websites without permission.