# Screen ## Starting Sessions ```bash screen -S name # New named session screen -RDS name # Reattach (or create), detaching elsewhere if needed screen -ls # List all sessions ``` ## Key Bindings All commands are prefixed with `Ctrl+A`: | Key | Action | |-----|--------| | `d` | Detach from session | | `c` | Create new window | | `n` / `p` | Next / previous window | | `0-9` | Switch to window by number | | `"` | List all windows | | `A` | Rename current window | | `S` | Split horizontally | | `\|` | Split vertically | | `Tab` | Switch between regions | | `X` | Close current region | | `k` | Kill current window | | `[` | Enter copy/scrollback mode | | `]` | Paste | ## Reattaching ```bash screen -r # Reattach (if only one session) screen -r name # Reattach to specific session screen -RR # Reattach or create screen -x name # Multi-display mode (multiple simultaneous connections) ``` ## Start Detached ```bash screen -dmS name command # Start named session running command in background ```