GNU Screen cheat-sheet

Posted by Arkham on January 26th, 2008

Screen Home:


  • 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
  • Ctrl+a Ctrl+a -> switch between last two windows
  • Ctrl+a n -> switch to next window
  • Ctrl+a p -> switch to previous 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
  • Ctrl+a : screen foo -> create a new window executing foo and set its name

How to use screen:

  • screen -ls -> list of detached screen
  • screen -r PID -> attach detached screen session
  • screen -S MySession -> start a screen session with name MySession
  • screen -r MySession -> attach screen session with name MySession
  • screen -S MySession -md /usr/bin/foo -> start a screen session called MySession, launching /usr/bin/foo inside of it, and then detach it
  • screen -DR -> if a session is running, reattach; if necessary detach and logout remotely first. If it was not running, create it


  • Ctrl+a S -> create split screen
  • Ctrl+a TAB -> switch between split screens
    If you created a new split screen, the current window is empty. either select an existing window (ctrl a “) or create a new split screen (ctrl a n).
  • 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)

This entry was posted on Saturday, January 26th, 2008 at 01:23 and is filed under computers. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Tags: , ,

One Response to “GNU Screen cheat-sheet”

  1. faber Says:

    When I saw this page on google results, I’ve shat bricks