Skip to content

Instantly share code, notes, and snippets.

@nootrope
Last active August 31, 2017 12:51
Show Gist options
  • Save nootrope/fd6ea1d7778220eae35062a0b1a66352 to your computer and use it in GitHub Desktop.
Save nootrope/fd6ea1d7778220eae35062a0b1a66352 to your computer and use it in GitHub Desktop.
screen command cheatsheet

Case: Session lists as attached but cannot be resumed.

Solution: Resume it on the current terminal after detaching it from the original, unavailable terminal.

screen -d -r [pid]


Case: Kill one screen session

screen -X -S [pid] quit

OR

screen -S [sessionname] -p 0 -X quit

OR

Resume screen session if not already in it

screen -r control-a, :quit


Case: In macOS, terminate and kill all active sessions

screen -X quit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment