nx1.info | tmux Cheat Sheet

See also: pluralsight
Table of Contents: ------------------ Prefix & Basics: command prefix (ctrl+b) general commands Windows & Panes: sessions management windows management panes & splits Copy & Navigation: copy mode & movement CLI Commands: tmux cli commands

Command Prefix: [^]

Ctrl+b  # Press before any of the keybindings below

General Commands: [^]

?  : See all keybindings
w  : Interactive list of all windows & panes across sessions

Sessions: [^]

:new -s session-name   # Create session from command prompt
$                     : Rename current session
d                     : Detach from session
(                     : Switch to previous session
)                     : Switch to next session

Windows: [^]

c  : Create new window
n  : Next window
p  : Previous window
l  : Last active window
,  : Rename current window
.  : Change window index number
f  : Find / search window by name

Panes: [^]

%  : Vertical split (side-by-side)
"  : Horizontal split (top-and-bottom)
!  : Break current pane out into its own window
x  : Kill current pane
z  : Toggle pane zoom (fullscreen)
q  : Briefly display pane index numbers

Copy Mode & Movement: [^]

[      : Enter copy mode (scrollback)
]      : Paste most recently copied buffer

# Inside Copy Mode:
Space  : Start selection
Enter  : Copy selection and exit
Esc    : Clear selection
g      : Jump to top of history
G      : Jump to bottom of history
/      : Search forward
?      : Search backward

CLI Commands: [^]

> tmux ls                                          # List running sessions
> tmux attach -t session-name                      # Attach to target session
> tmux new -s session-name                         # Create new named session
> tmux move-window -s session2:0 -t session1:       # Move window between sessions
> tmux kill-session -t session-name                # Terminate session