tmux cheat sheet
Sessions that survive a dropped connection, and panes for everything else. Key bindings use the default prefix, Ctrl-b: press it, let go, then press the next key.
In Snippet Keeper, click Import at the bottom of the sidebar and choose the file. They land in your tmux app, and ones you already have are skipped. The highlighted parts become fill-in fields: type a value (or pick one), and the finished command is on your clipboard.
Sessions
tmux new -s name
tmux ls
tmux attach -t name
tmux kill-session -t name
Ctrl-b d
Ctrl-b s
Ctrl-b $
Windows
Ctrl-b c
Ctrl-b n / Ctrl-b p
Ctrl-b number
Ctrl-b w
Ctrl-b ,
Ctrl-b &
Panes
Ctrl-b %
Ctrl-b "
Ctrl-b ←↑→↓
Ctrl-b z
Ctrl-b x
Ctrl-b Space
Ctrl-b q
Ctrl-b !
Ctrl-b Ctrl-←↑→↓
Copy mode
Ctrl-b [
Ctrl-b ]
Config
set -g mouse on
set -g base-index 1
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
tmux source-file ~/.tmux.conf
Keep these one keystroke away.
Snippet Keeper is a Mac app for the commands you keep looking up. Press ⌥⇧Space in any app, type a few letters, fill in the blanks, and it’s on your clipboard.