tmux

Simple Cheat Sheet

C-a "       Split window vertically
C-a %       Split window horizontally
C-a 0       Select window 0
C-a 1       Select window 1
C-a 2       Select window 2
C-a 3       Select window 3
C-a 4       Select window 4
C-a 5       Select window 5
C-a 6       Select window 6
C-a 7       Select window 7
C-a 8       Select window 8
C-a 9       Select window 9
C-a ;       Move to the previously active pane
C-a ?       List key bindings
C-a [       Enter copy mode
C-a ]       Paste the most recent paste buffer
C-a c       Create a new window
C-a d       Detach the current client
C-a l       Select the previously current window
C-a n       Select the next window
C-a o       Select the next pane
C-a p       Select the previous window
C-a q       Display pane numbers
C-a r       Redraw the current client
C-a w       Choose a window from a list
C-a z       Zoom the active pane
C-a Up      Select the pane above the active pane
C-a Down    Select the pane below the active pane
C-a Left    Select the pane to the left of the active pane
C-a Right   Select the pane to the right of the active pane
C-a M-o     Rotate through the panes in reverse
C-a M-Up    Resize the pane up by 5
C-a M-Down  Resize the pane down by 5
C-a M-Left  Resize the pane left by 5
C-a M-Right Resize the pane right by 5
C-a C-o     Rotate through the panes
C-a C-Up    Resize the pane up
C-a C-Down  Resize the pane down
C-a C-Left  Resize the pane left
C-a C-Right Resize the pane right

.tmux.conf

Example .tmux.conf configuration file:

cat <<EOF >>.tmux.conf
# Use C-a instead of C-b as the prefix key
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# When we have VISUAL or EDITOR set to vi or vim, we still prefer to use the
# emacs keys for up, down, left and right.
set -g mode-keys emacs
set -g status-keys emacs
EOF

Attach to Existing Session or Start New Session

$ tmux new -A

Optionally, set an alias in .bash_aliases of:

alias tmux='tmux new -A'

Resources


Related Topics: LinuxHintsAndTips, ScreenTips

-- Frank Dean - 21 Mar 2026