Skip to content

Instantly share code, notes, and snippets.

@kbseah
Forked from fredrick/screen.md
Last active December 13, 2022 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kbseah/c0c73dd520b2d8fa9859c36089ad758d to your computer and use it in GitHub Desktop.
Save kbseah/c0c73dd520b2d8fa9859c36089ad758d to your computer and use it in GitHub Desktop.
GNU Screen Cheat Sheet

GNU Screen Cheat Sheet

Basics

  • ctrl a c -> create new window
  • ctrl a A -> set window name
  • ctrl a w -> show all window
  • ctrl a 1|2|3|… -> switch to window n
  • ctrl a " -> choose window from menu
  • ctrl a ' -> choose window by number
  • ctrl a ctrl a -> switch between window
  • ctrl a d -> detach window
  • ctrl a ? -> help
  • ctrl a [ -> start copy, move cursor to the copy location, press ENTER, select the chars, press ENTER to copy the selected characters to the buffer
  • ctrl a ] -> paste from buffer

Starting screen

  • screen –ls -> list of detached screen
  • screen –r PID -> attach detached screen session
  • screen –dmS MySession -> start a detached screen session
  • screen –r MySession -> attach screen session with name MySession
  • screen -dr -> detach and reattach screen session

Advanced

  • ctrl a S -> create split screen
  • ctrl a TAB -> switch between split screens
  • ctrl a Q -> Kill all regions but the current one.
  • ctrl a X -> remove active window from split screen
  • ctrl a O -> logout active window (disable output)
  • ctrl a I -> login active window (enable output)
  • ctrl a g -> toggle visual bell mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment