Search code examples
gnu-screen

Difference between screen flags -r and -x


What exactly is the difference between screen -x and screen -r. I know they're both for reattaching to the screen, but not sure I grasp when to use one or the other.


Solution

  • -r attaches a detached session, while -x attaches an attached session without detaching it, so it runs in both the places at the same time. Another useful option combination is -d -r which detaches a session if needed first and then reattaches it.