Catalog / GNU Screen Cheatsheet
GNU Screen Cheatsheet
A quick reference guide to using GNU Screen, a terminal multiplexer. Learn how to manage multiple terminal sessions within a single window, detach and reattach sessions, and customize your screen environment.
Session Management
Starting a Screen Session
Example:
|
Example:
|
Example:
|
Detaching and Reattaching
|
Detach the current screen session. The session continues to run in the background. |
|
Reattach to a detached screen session. If multiple sessions are running, it attaches to the first available. |
|
Reattach to a specific named screen session.
|
|
List all active screen sessions. Provides session IDs or names for reattaching. |
Ending a Screen Session
|
|
Window Management
Creating New Windows
|
|
Switching Between Windows
|
Switch to the next window in the session. |
|
Switch to the previous window in the session. |
|
Switch to a specific window by its number (0-9). |
|
Prompts for a window number or title to switch to. |
|
Toggles between the current and previous window. |
Window Information
|
|
|
Advanced Features
Screen Splitting
|
Split the current window horizontally into two regions. |
|
Split the current window vertically into two regions. |
|
Switch the input focus to the next region. (Note: May be |
|
Remove all regions except the current one. |
|
Kill the current region. Requires confirmation. |
Copy and Paste
|
Press |
Press |
Scrolling
|
Enter scrollback mode. Use arrow keys, Page Up, Page Down, Home, and End to navigate the scrollback buffer. |
|
Exit scrollback mode. |
Configuration
Configuration File
Screen’s configuration is managed through the |
Example:
|
Common Configuration Options
|
Disable the startup message. |
|
Disable visual bell (flashing screen). |
|
Bind a key combination to a screen command. For example:
|
|
Sets the default scrollback buffer size for new windows. Example:
|
|
Always show caption line at the bottom of the screen. |