Skip to content

Instantly share code, notes, and snippets.

@fredrick
Created September 14, 2011 15:30
Show Gist options
  • Star 94 You must be signed in to star a gist
  • Fork 30 You must be signed in to fork a gist
  • Save fredrick/1216878 to your computer and use it in GitHub Desktop.
Save fredrick/1216878 to your computer and use it in GitHub Desktop.
GNU Screen Cheat Sheet

#GNU Screen Cheat Sheet

##Basics

  • ctrl a c -> cre­ate new win­dow
  • ctrl a A -> set win­dow name
  • ctrl a w -> show all win­dow
  • ctrl a 1|2|3|… -> switch to win­dow n
  • ctrl a " -> choose win­dow
  • ctrl a ctrl a -> switch between win­dow
  • ctrl a d -> detach win­dow
  • ctrl a ? -> help
  • ctrl a [ -> start copy, move cur­sor to the copy loca­tion, press ENTER, select the chars, press ENTER to copy the selected char­ac­ters to the buffer
  • ctrl a ] -> paste from buffer

##Starting screen

  • screen –DR -> list of detached screen
  • screen –r PID -> attach detached screen ses­sion
  • screen –dmS MySes­sion -> start a detached screen ses­sion
  • screen –r MySes­sion -> attach screen ses­sion with name MySession

##Advanced

  • ctrl a S -> cre­ate split screen
  • ctrl a TAB -> switch between split screens
  • ctrl a Q -> Kill all regions but the cur­rent one.
  • ctrl a X -> remove active win­dow from split screen
  • ctrl a O -> logout active win­dow (dis­able out­put)
  • ctrl a I -> login active win­dow (enable output)
@cybersholt
Copy link

Thank you, idk why I always forget these!!

@RecNes
Copy link

RecNes commented Sep 3, 2017

There is confusion with "list screen sessions" (-ls or -list) and "detach and reattach here given session" (-DR) keys. Looks like need to be corrected ❗ ;)

@PoolloverNathan
Copy link

If only this was normal GitHub, I could make a PR...

@satbeeer
Copy link

satbeeer commented Nov 5, 2020

thanks man

@raushan70
Copy link

Thanks bro!

@borkxs
Copy link

borkxs commented Aug 18, 2021

👋 haha hi @fredrick long time no see. Your gist is absolutely crushing the "gnu screen cheat sheet" SEO.

@Changes2018
Copy link

Why am is my screen command not responding and giving me an error message

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