~/everything-else/tmux Reference
Updated Apr 28, 2022

🗂 tmux Reference


tmux ls: List sessions

tmux new-session -s <session-name>: New session

tmux a: Reattach last used (short for attach)

tmux a -t <session-name>: Reattach

tmux source-file ~/.tmux.conf: Reload


Default prefix: Ctrl-b

?: List commands
d: Detatch

:source-file ~/.tmux.conf


c: New window
:new-window -n <name>

<N>: Switch to window N
w: Select
p: Previous
n: Next
x: Kill
,: Rename


": horizontal split
%: vertical split
<space>: rearrange
o: focus next
<arrow>: move focus
ctrl-<arrow>: resize
}: swap
!: move to new window
z: zoom


): Next
(: Previous
s: Select
$: rename

Move / Organize

# Swap panes 1 and 3 in current session
:swap-panes -s 1 -t 3

# Move pane 4 up (left) by 1
:swap-panes -U -t 4
# Move pane 4 down (right) by 1
:swap-panes -D -t 4

# Mark current pane
:select-pane -m

# Swap pane 3 in current session with marked pane (may be in a different session)
swap-window -t 3

Intro & Reference

Configuration & Customization

Utilities & Extensions