Show Menu
Cheatography

tmux Cheat Sheet by

Cheatdheet from tmuxcheatsheet.com

Sessions

Start a new session
Start a new session with the name mysession
$tmux
$tmux new / $tmux new-session
:new
$tmux new -s mysession
:new -s mysession
kill/delete session mysession
Rename session
$tmux kill-ses -t mysession
$tmux kill-s­ession -t mysession
Ctrl + b $
kill/d­elete all sessions but the current
kill/d­elete all sessions but mysession
$tmux kill-s­ession -a
$tmux kill-s­ession -a -t mysession
Detach from session
Detach others on the session
Ctrl + b d
:attach -d
Attach to last session
Attach to a session with the name mysession
$tmux a
$tmux at
$tmux attach
$tmux attach-session
$tmux a -t mysession
$tmux at -t mysession
$tmux attach -t mysession
$tmux attach-session -t mysession
Show all sessions
Move to previous / next session
tmux ls
$tmux list-sessions
$Ctrl + b s
Ctrl + b ( / )
Session and Window Preview
Ctrl + b w

Misc

Enter command mode
Ctrl + b :
Set OPTION for all sessions
:set -g OPTION
Set OPTION for all windows
:setw -g OPTION
Enable mouse mode
:set mouse on

List key bindin­gs(­sho­rtcuts)
$tmux list-keys
Ctrl + b ?
:list-keys
Show every session, window, pane, etc...
$tmux info
 

Windows

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
Toggle last active window
Ctrl + b l
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

Panes

Toggle last active pane
Ctrl + b ;
Split pane with horizontal layout
Ctrl + b %
Split pane with vertical layout
Ctrl + b "
Move the current pane left / right
Ctrl + b { / }
Switch to pane to the direction
Ctrl + b
Toggle synchr­oni­ze-­pan­es(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
(holding second key is optional)
Ctrl + b +
Ctrl + b Ctrl +
Ctrl + b +
Ctrl + b Ctrl +
Close current pane
Ctrl + b x
   
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          tmux the terminal multiplexer Cheat Sheet
          Byobu Keybindings Cheat Sheet
          Tmux Cheat Sheet