Useful Tmux Commands

General

:source-file ~/.tmux.conf       // Reload .tmux.conf

Sessions

C+b s           // list sessions
C+b $           // name session

From Command Line

tmux                            // start
tmux new -s myname              // start new with session name
tmux a  #                       // attach
tmux a -t myname                // attach to named
tmux ls                         // list sessions
tmux kill-session -t myname     // kill session

Windows

C+b c           // new window
C+b ,           // name window
C+b w           // list windows
C+b &           // kill window

Panes

C+b %                   // horizontal split
C+b "                   // vertical split
C+b o                   // swap pane focus
C+b x                   // kill pane
C+b q                   // show pane numbers
:swap-pane -s 2 -t 1    // Swap pane 1's position with pane 2's

Resize

:resize-pane -D (Resizes the current pane down)
:resize-pane -U (Resizes the current pane upward)
:resize-pane -L (Resizes the current pane left)
:resize-pane -R (Resizes the current pane right)
:resize-pane -D 10 (Resizes the current pane down by 10 cells)
:resize-pane -U 10 (Resizes the current pane upward by 10 cells)
:resize-pane -L 10 (Resizes the current pane left by 10 cells)
:resize-pane -R 10 (Resizes the current pane right by 10 cells)