Show Menu
Cheatography

Ultimate tmux (v2.3) Cheat Sheet (DRAFT) by

The utimate tmux cheatsheet for tmux version 2.3

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Sessions

New session
tmux new
New named session
tmux new -t name
Rename session
tmux rename -t old new
List session
tmux ls
Attach to named session
tmux att[ach] -t name
Attach to last session
tmux att[ach]
Kill session
tmux kill-s­ession -t name
List all clients
tmux list-c­lients
List clients within session
tmux list-c­lients -t name
Detach from session
d
Switch to next session
)
Switch to previous session
(
Rename session
$

Window Management

Create new window
c
Switch to next window
n
Switch to previous window
p
List windows
w
Switch to window number
number
Switch to window name
' (apost­rophe)
Switch to last window
l (lima)
Change window name
, (comma)
Kill current window
&

Copy / Paste

Copy
1.
[

2. Ctrl-space to mark start of text
3. Ctrl-w to mark end of text
Paste
]
See Mouse Integr­ation for more natural copy/paste functions.

tmux.conf

Default config file
~/.tmu­x.conf
Enable mouse integr­ation
setw -g mouse on
Change bind-key
unbind C-b
set-option -g prefix C-a
bind-key C-a send-p­refix
Better pane splitting
(using | and -)
bind | split-­window -h
bind - split-­window -v
unbind '"'
unbind %
 

Panes

Split pane left/right
%
Split pane top/bottom
" (double quote)
Switch to pane up
Switch to pane below
Switch to pane to the right
Switch to pane to the left
Switch to next pane in set
o (oscar)
Switch to last used pane
; (semi-­colon)
Break out pane to a new window
! (excla­mation)
Zoom pane to full window
z
Query pane numbers
q
Show the time (clock)
t
Mark the current pane
m
Unmark the current pane
M
Kill pane
x (confirm with y)
Resize pane height1
or
Resize pane width1
or
1 Keep the bind-key held down whilst pressing the cursor key
See Mouse Integr­ation for more natural pane selection and resizing functions

Mouse Integr­ation

Select Pane
Click in pane
Re-size pane
Drag pane divider
Copy text
1. Hold SHIFT key
2. Select text with mouse (Left button)
3. Right click
4. Click "­Cop­y"
Paste text
1. Hold SHIFT key
2. Right click
3. Click "­Pas­te"
See tmux.conf section for details on how to enable mouse integr­ation

Key

Bind-key. The bind-key default is Ctrl-b but is config­urable. Here, we use this symbol to represent your bind-key
Type on the linux command line
This option toggles - repeating the command will switch between on and off
Press Esc key to exit from this mode
(text)
Inform­ation (not typed)
(lima) (OSCAR)
Inform­ation (not typed). Phonetic alphabet to clarify ambiguous characters (note the lowercase and uppercase signif­icance)
[ ]
Optional