Tmux commands and shortcuts

Tmux commands and shortcuts


These commands work with my .tmux.conf file which can be found at

wget # OR
curl -O

source the file from inside of tmux session:

<prefix>:source ~/.tmux.conf

(prefix will be ctrl-a or ctrl-b)



ctrl + a

start new


start new session with name

tmux new -s myname


tmux -a

attach to named session

tmux -a -t myname

list sessions

tmux ls

kill session

tmux kill-session -t myname

The following must be prefixed with the prefix C-a


s switch sessions (use j and k plus <CR> to switch sessions)

$ rename session

d detach user from session

Windows (tabs)

A rename window

c create window

w list windows

n next window

p previous window

f find window

, name window

& kill window

H L swap window with window to left or right

Moving windows:

Reordering windows: ,

:swapw -t 2 swap current window with spot 2

movew move window to next unused number

movew -t 3 move window to spot 3

movew -t other: move window to session ‘other’

movew -t other:3 move window to session ‘other’ window-spot 3

Panes (splits)

% vertical split

" horizontal split

z toggle zoom (i.e. full-screen)

h j k l move pane left, down, up, and right

ctrl + h j k l resize pane left, down, up, and right

! break pane into its own window

:join-pane -t :n join pane back into window n

:setw synchronize-panes toggle synchronizing panes! Super useful for running commands in multiple folders or on multiple servers at once



Copy Mode