Catalog / Terminal Multiplexers Cheatsheet (tmux & screen)
Terminal Multiplexers Cheatsheet (tmux & screen)
A comprehensive cheat sheet covering essential commands and configurations for using tmux and screen, two popular terminal multiplexers. This guide provides a quick reference for managing sessions, windows, and panes, enhancing productivity in the terminal.
tmux Basics
Session Management
|
Create a new tmux session with a specified name. |
|
Attach to an existing tmux session. |
|
List all active tmux sessions. |
|
Kill a specific tmux session. |
|
Rename a tmux session. |
|
Detach from the current tmux session. |
Window Management
|
Create a new window. |
|
Rename the current window. |
|
Go to the next window. |
|
Go to the previous window. |
|
Go to a specific window by number. |
|
List all windows and choose one to switch to. |
|
Kill the current window. |
Pane Management
|
Split the current window into two panes vertically. |
|
Split the current window into two panes horizontally. |
|
Move to the pane in the direction of the arrow key. |
|
Cycle through the panes. |
|
Toggle pane zoom (maximize/restore). |
|
Break the current pane out into a new window. |
|
Kill the current pane. |
screen Basics
Session Management (screen)
|
Start a new screen session. |
|
Start a new named screen session. |
|
Resume a detached screen session. |
|
Resume a specific named screen session. |
|
List all active screen sessions. |
|
Detach from the current screen session. |
|
Kill a screen session by its PID (found with |
Window Management (screen)
|
Create a new window. |
|
Go to the next window. |
|
Go to the previous window. |
|
Switch to window number |
|
Display a list of windows for selection. |
|
Rename the current window. |
|
Kill the current window. |
Other Useful Commands (screen)
|
Display help. |
|
Send |
|
Display the time and load average. |
|
View screen version information. |
|
Enable/disable logging of the current window to a file. |
Configuration (tmux)
tmux Configuration File
The tmux configuration file is typically located at Example: |
|
Keybindings
|
Bind a key to a specific tmux command. Example: |
|
Unbind a key. Example: |
Options
|
Set a global tmux option. Example: |
|
Set a window-specific tmux option. Example: |
Configuration (screen)
screen Configuration File
The screen configuration file is typically located at **Example: |
|
Keybindings (screen)
|
Bind a key to a specific screen command. Example: |
|
Unbind a key. Example: |
Options (screen)
|
Set the default scrollback buffer size. Example: |
|
Enable or disable visual bell. Example: |