Command | Description |
---|---|
swap-pane -s 3 -t 1 |
Swap pane |
swap-window -t -1 |
Move to left |
setw synchronize-panes |
Sync Panes |
join-pane -t :# |
Join pane |
Tmux Cheat Sheet
The tmux cheat sheet quick reference of most commonly used shortcuts and commands
Tmux Command Mode
Misc
Setting
Command | Description |
---|---|
set -g OPTION |
Set for all sessions |
setw -g OPTION |
Set for all windows |
setw -g mode-keys vi |
Enable vi-mode |
set -g prefix C-a |
Set prefix |
Copying
Command | Description |
---|---|
list-buffers |
List all buffers |
show-buffer |
Show #0 contents |
capture-pane |
Copy of pane |
choose-buffer |
Show and paste |
save-buffer a.txt |
Save to file |
delete-buffer -b 1 |
Delete buffer 1 |
Listing
Command | Description |
---|---|
list-keys |
All commands |
list-panes |
All panes |
list-windows |
All Windows |
Resizing
Command | Description |
---|---|
resize-pane -D 20 |
Resize down |
resize-pane -U 20 |
Resize up |
resize-pane -L 20 |
Resize left |
resize-pane -R 20 |
Resize right |
Usage
Command | Description |
---|---|
Ctrl+b : |
Enter command mode |
Tmux shortcuts
Session (Set of Windows)
- | - |
---|---|
Ctrl+b d |
Detach from session |
Ctrl+b s |
Show all sessions |
Ctrl+b $ |
Rename session |
Ctrl+b ( / ) |
Previous/Next session |
Window (Tabs)
- | - |
---|---|
Ctrl+b c |
Create window |
Ctrl+b p / n |
Previous/Next window |
Ctrl+b " / % |
Split Horiz/Vert |
Ctrl+b w |
List window |
Ctrl+b , |
Rename window |
Ctrl+b f |
Find window |
Ctrl+b l |
Last window |
Ctrl+b . |
Move window |
Ctrl+b & |
Close window |
Ctrl+b 0 …9 |
Goto # window |
Panes (Splits)
Shortcuts | Description |
---|---|
Ctrl+b " / % |
Split Horiz/Vert |
Ctrl+b ! |
Pane -> Window |
Ctrl+b x |
Kill pane |
Ctrl+b |
Navigate panes |
Ctrl+b |
Toggle layouts |
Ctrl+b { / } |
Move to Left/Right |
Ctrl+b o |
Goto next panes |
Ctrl+b z |
toggle full-screen |
Ctrl+b ; |
Toggle Last pane |
Ctrl+b q |
Show numbers |
Ctrl+b q 0 …9 |
Goto # pane |
Getting started
Shortcuts | Description |
---|---|
Ctrl+b ? |
List all shortcuts |
Show every session, window, pane, etc.
$ tmux info
Tmux CLI
Config
Reload config
$ tmux source-file ~/.tmuÂx.conf
Show config
$ tmux show-options -g
Tmux help
$ tmux info
Kill session
Kill a session by name
$ tmux kill-ses -t myname
Kill sessions but the current
$ tmux kill-ses -a
Kill sessions but 'myname'
$ tmux kill-ses -a -t myname
Attach session
Attach to last session
$ tmux a
Attach to named
$ tmux a -t myname
New session
Start a new session
$ tmux
Start a new named session
$ tmux new -s myname
Show all sessions
$ tmux ls