Tmux Quick Reference



Start a new session

tmux new
tmux new-session

Start a new session with the name goyun

tmux new -s goyun
new -s goyun

kill/delete session goyun

tmux kill-ses -t goyun
tmux kill-session -t goyun

kill/delete all sessions but the current

tmux kill-session -a

kill/delete all sessions but goyun

tmux kill-session -a -t goyun

Rename session

Ctrl + b $

Detach from session

Ctrl + b d

Detach others on the session (Maximize window by detach other clients)

attach -d

Show all sessions

tmux ls
tmux list-sessions
Ctrl + b s

Attach to last session

tmux a
tmux at
tmux attach
tmux attach-session

Attach to a session with the name goyun

tmux a -t goyun
tmux at -t goyun
tmux attach -t goyun
tmux attach-session -t goyun

Move to previous session

Ctrl + b (

Move to next session

Ctrl + b )


start a new session with the name goyun and window nextruby

tmux new -s goyun -n nextruby

Create window

Ctrl + b c

Rename current window

Ctrl + b ,

Close current window

Ctrl + b &

Previous window

Ctrl + b p

Next window

Ctrl + b n

Switch/select window by number

Ctrl + b 0 ... 9

Reorder window, swap window number 2(src) and 1(dst)

:swap-window -s 2 -t 1

Move current window to the left by one position

:swap-window -t -1


Toggle last active pane

Ctrl + b ;

Split pane vertically

Ctrl + b %

Split pane horizontally

Ctrl + b "

Move the current pane left

Ctrl + b {

Move the current pane right

Ctrl + b }

Switch to pane to the direction

Ctrl + b + arrow key

Toggle synchronize-panes(send command to all panes)

:setw synchronize-panes

Toggle between pane layouts

Ctrl + b Spacebar

Switch to next pane

Ctrl + b o

Show pane numbers

Ctrl + b q

Switch/select pane by number

Ctrl + b q 0 ... 9

Toggle pane zoom

Ctrl + b z

Convert pane into a window

Ctrl + b !

Resize current pane height

Ctrl + b +

Ctrl + b +

Resize current pane width

Ctrl + b +

Ctrl + b +

Close current pane

Ctrl + b x

Copy Mode

use vi keys in buffer

:setw -g mode-keys vi

Enter copy mode

Ctrl + b [

Enter copy mode and scroll one page up

Ctrl + b PgUp

Quit mode


Go to top line


Go to bottom line


Scroll up

Scroll down

Move cursor left


Move cursor down


Move cursor up


Move cursor right


Move cursor forward one word at a time


Move cursor backward one word at a time


Search forward


Search backward


Next keyword occurance


Previous keyword occurance


Start selection


Clear selection


Copy selection


Paste contents of buffer_0

Ctrl + b ]

display buffer_0 contents


copy entire visible contents of pane to a buffer


Show all buffers


Show all buffers and paste selected


Save buffer contents to goyun.txt

:save-buffer goyun.txt

delete buffer_1

delete-buffer -b 1


Enter command mode

Ctrl + b :

Set OPTION for all sessions

set -g OPTION

Set OPTION for all windows

setw -g OPTION


tmux infoCtrl + b ?