Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save xiaochen-2050/52263edba34c35632c9c9c2563893c38 to your computer and use it in GitHub Desktop.
Save xiaochen-2050/52263edba34c35632c9c9c2563893c38 to your computer and use it in GitHub Desktop.

Revisions

  1. @jctosta jctosta revised this gist Aug 2, 2021. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -73,7 +73,8 @@ All screen commands are prefixed by an escape key, by default Ctrl-a (that's Con

    ## Scrolling

    | Description | Command |
    | Description | Command |
    |-----|------|
    | Enter scrolling mode | Ctrl-a esc |
    | Scroll Up | Ctrl-u |
    | Scroll Down | Ctrl-d |
  2. @jctosta jctosta revised this gist Aug 2, 2021. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,7 @@
    | Attach to a running session with name | `screen -r <session_name>` |
    | Detach a running session | `screen -d <session_name>` |
    | Kill a running session | `screen -X -S [session # you want to kill] kill` |
    | Accessing a screen that is already attached | `screen -r -d [session name]` |

    ## Escape Key

    @@ -68,4 +69,14 @@ All screen commands are prefixed by an escape key, by default Ctrl-a (that's Con
    | Enter digraph (for producing non-ASCII characters) | `Ctrl-a Ctrl-v` |
    | Lock (password protect) display | `Ctrl-a x` |
    | Enter screen command | `Ctrl-a :` |
    | Enable logging in the screen session | `Ctrl-a H` |
    | Enable logging in the screen session | `Ctrl-a H` |

    ## Scrolling

    | Description | Command |
    | Enter scrolling mode | Ctrl-a esc |
    | Scroll Up | Ctrl-u |
    | Scroll Down | Ctrl-d |
    | Exit scrolling mode | esc esc |

    This section is a contribution from: [@mickpbarry](https://gist.github.com/mickpbarry)
  3. @jctosta jctosta revised this gist Dec 1, 2020. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -5,10 +5,11 @@
    | Description | Command |
    |---------------------------------------|---------------------------------------|
    | Start a new session with session name | `screen -S <session_name>` |
    | List running sessions / screens | `screen -ls` |
    | Attach to a running session | `screen -x` |
    | List running sessions / screens | `screen -ls` |
    | Attach to a running session | `screen -x` |
    | Attach to a running session with name | `screen -r <session_name>` |
    | Detach a running session | `screen -d <session_name>` |
    | Detach a running session | `screen -d <session_name>` |
    | Kill a running session | `screen -X -S [session # you want to kill] kill` |

    ## Escape Key

  4. @jctosta jctosta revised this gist Sep 19, 2014. 1 changed file with 39 additions and 0 deletions.
    39 changes: 39 additions & 0 deletions screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -29,3 +29,42 @@ All screen commands are prefixed by an escape key, by default Ctrl-a (that's Con
    |---------------|-------------------------------|
    | See help | `Ctrl-a ?` (Lists keybindings)|

    ## Window Management

    | Description | Command |
    |---------------------------------------|-----------------------------------------------------------------------|
    | Create new window | `Ctrl-a c` |
    | Change to last-visited active window | `Ctrl-a Ctrl-a` (commonly used to flip-flop between two windows) |
    | Change to window by number | `Ctrl-a <number>` (only for windows 0 to 9) |
    | Change to window by number or name | `Ctrl-a ' <number or title>` |
    | Change to next window in list | `Ctrl-a n` or `Ctrl-a <space>` |
    | Change to previous window in list | `Ctrl-a p` or `Ctrl-a <backspace>` |
    | See window list | `Ctrl-a "` (allows you to select a window to change to) |
    | Show window bar | `Ctrl-a w` (if you don't have window bar) |
    | Kill current window | `Ctrl-a k` (not recommended) |
    | Kill all windows | `Ctrl-a \` (not recommended) |
    | Rename current window | `Ctrl-a A` |

    ## Split screen

    | Description | Command |
    |---------------------------------------|-----------------------------------------------------------------------|
    | Split display horizontally | `Ctrl-a S` |
    | Split display vertically | `Ctrl-a |` or `Ctrl-a V` (for the vanilla vertical screen patch) |
    | Jump to next display region | `Ctrl-a tab` |
    | Remove current region | `Ctrl-a X` |
    | Remove all regions but the current one| `Ctrl-a Q` |

    ## Misc

    | Description | Command |
    |-------------------------------------------------------|-----------------------------------------------------------------------|
    | Redraw window | `Ctrl-a C-l` |
    | Enter copy mode | `Ctrl-a [` or `Ctrl-a <esc>` (also used for viewing scrollback buffer)|
    | Paste | `Ctrl-a ]` |
    | Monitor window for activity | `Ctrl-a M` |
    | Monitor window for silence | `Ctrl-a _` |
    | Enter digraph (for producing non-ASCII characters) | `Ctrl-a Ctrl-v` |
    | Lock (password protect) display | `Ctrl-a x` |
    | Enter screen command | `Ctrl-a :` |
    | Enable logging in the screen session | `Ctrl-a H` |
  5. @jctosta jctosta revised this gist Sep 19, 2014. 1 changed file with 20 additions and 0 deletions.
    20 changes: 20 additions & 0 deletions screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -9,3 +9,23 @@
    | Attach to a running session | `screen -x` |
    | Attach to a running session with name | `screen -r <session_name>` |
    | Detach a running session | `screen -d <session_name>` |

    ## Escape Key

    All screen commands are prefixed by an escape key, by default Ctrl-a (that's Control-a, sometimes written ^a). To send a literal Ctrl-a to the programs in screen, use Ctrl-a a. This is useful when when working with screen within screen. For example Ctrl-a a n will move screen to a new window on the screen within screen.

    ## Getting Out

    | Description | Command |
    |---------------------------------------|-------------------------------------------------------|
    | detach | `Ctrl-a d` |
    | detach and logout (quick exit) | `Ctrl-a D D` |
    | exit screen | `Ctrl-a :` quit or exit all of the programs in screen.|
    | force-exit screen | `Ctrl-a C-\` (not recommended) |

    ## Help

    | Description | Command |
    |---------------|-------------------------------|
    | See help | `Ctrl-a ?` (Lists keybindings)|

  6. @jctosta jctosta revised this gist Sep 19, 2014. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -2,12 +2,10 @@

    ## Basic

    |---------------------------------------|---------------------------------------|
    | Description | Command |
    |---------------------------------------|---------------------------------------|
    | Start a new session with session name | `screen -S <session_name>` |
    | List running sessions / screens | `screen -ls` |
    | Attach to a running session | `screen -x` |
    | Attach to a running session with name | `screen -r <session_name>` |
    | Detach a running session | `screen -d <session_name>` |
    |---------------------------------------|---------------------------------------|
  7. @jctosta jctosta created this gist Sep 19, 2014.
    13 changes: 13 additions & 0 deletions screen_cheatsheet.markdown
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # Screen Quick Reference

    ## Basic

    |---------------------------------------|---------------------------------------|
    | Description | Command |
    |---------------------------------------|---------------------------------------|
    | Start a new session with session name | `screen -S <session_name>` |
    | List running sessions / screens | `screen -ls` |
    | Attach to a running session | `screen -x` |
    | Attach to a running session with name | `screen -r <session_name>` |
    | Detach a running session | `screen -d <session_name>` |
    |---------------------------------------|---------------------------------------|