This is a quick reference guide cheat sheet for the screen command.
$ screen 
1. Press Ctrl-A D to detach session
2. List all screen sessions
$ screen -ls
3. Re-attach a screen Session
$ screen -r <name/pid>
| Options | Example | Description | 
|---|---|---|
| -S | screen -S debug | Start a new session with session name | 
| -ls | screen -ls | List running sessions / screens | 
| -x | screen -x | Attach to a running session | 
| -r | screen -r debug | Attach to a running session with name | 
| -R | screen -R debug | Attach to a session (Will create if it doesn't exist) | 
| -d | screen -d -m wget xxxx.com/large.file | Start screen in detached mode | 
| -X | screen -X -S debug kill | Kill a running session | 
| Command | Description | 
|---|---|
| Ctrl-A? | See help (Lists keybindings) | 
| Command | Description | 
|---|---|
| Ctrl-AC | Create new window | 
| Ctrl-ACtrl-A | Change to last-visited active window | 
| Ctrl-A0...9 | Change to window by number | 
| Ctrl-A'<0...9 or title> | Change to window by number or name | 
| Ctrl-ANorCtrl-A<space> | Change to next window in list | 
| Ctrl-APorCtrl-A<backspace> | Change to previous window in list | 
| Ctrl-A" | See window list | 
| Ctrl-AW | Show window bar | 
| Ctrl-AK | Kill current window (not recommended) | 
| Ctrl-A\ | Kill all windows (not recommended) | 
| Ctrl-AA | Rename current window | 
| Command | Description | 
|---|---|
| Ctrl-AD | Detach | 
| Ctrl-ADD | Detach and logout (quick exit) | 
| Ctrl-A: | Exit all session | 
| Ctrl-AC-\ | Force-exit screen (not recommended) | 
| Command | Description | 
|---|---|
| Ctrl-AS | Split display horizontally | 
| Ctrl-AV | Split display vertically | 
| Ctrl-A| | Split display vertically | 
| Ctrl-ATAB | Jump to next display region | 
| Ctrl-AX | Remove current region | 
| Ctrl-AQ | Remove all regions but the current one | 
| Command | Description | 
|---|---|
| Ctrl-AC-l | Redraw window | 
| Ctrl-A[ | Copy mode | 
| Ctrl-AESC | Copy mode | 
| Ctrl-A] | Paste | 
| Ctrl-AM | Monitor window for activity | 
| Ctrl-A_ | Monitor window for silence | 
| Ctrl-ACtrl-V | Enter digraph (non-ASCII characters) | 
| Ctrl-AX | Lock (password protect) display | 
| Ctrl-A: | Enter screen command | 
| Ctrl-AH | Enable logging in the screen session | 
SSH and attach in one line
$ ssh -t user@host screen -x <name/pid>