$ man tmux, but useful
tmux cheat sheet
Every default keybinding and command — searchable, copyable, and honest about the gotchas. Press / to search anything. Press Ctrl+b then ? — this site speaks tmux.
A session is a workspace that survives disconnects. Detach, go home, reattach — everything is still running.
$ tmux new -s nameStart a new named session$ tmux new -s name -dStart a session without attaching$ tmux attach -t nameAttach to a session$ tmux new -As nameAttach if it exists, create if not$ tmux lsList sessions$ tmux kill-session -t nameKill a session$ tmux kill-session -aKill every session except the current one$ tmux kill-serverKill the tmux server and all sessions$ tmux detachDetach (from the command prompt)$ tmux rename-session -t old newRename a sessionWindows are like browser tabs inside a session. The status bar at the bottom lists them.
$ tmux neww -n nameCreate a named window$ swap-window -s 2 -t 1Swap two windows by index$ move-window -rRenumber windows to close gaps$ link-window -s other:1Share a window from another sessionPanes split one window into multiple terminals, side by side or stacked.
$ join-pane -s :2Pull window 2 in as a pane here$ setw synchronize-panesType into every pane at once (toggle)$ capture-pane -p -S -1000Dump the last 1000 lines of a pane$ pipe-pane -o 'cat >> ~/pane.log'Log all pane output to a file (toggle)$ respawn-pane -kRestart the command in a dead pane$ display-popup -E 'command'Run a command in a floating popupResize panes by hand or snap every pane into one of tmux's preset layouts.
Copy mode freezes the screen so you can scroll, search, and copy text with the keyboard (vi-style keys shown).
Everything you copy in tmux lands in a paste buffer — tmux keeps a history of them.
$ tmux lsbList paste buffers$ tmux showbPrint the newest buffer to stdout$ tmux saveb file.txtSave the newest buffer to a file$ tmux loadb file.txtLoad a file into a bufferThe command prompt, built-in help, and everything that doesn't fit elsewhere.
$ tmux source ~/.tmux.confReload your config$ tmux send-keys -t name 'cmd' EnterType into a session from outside$ tmux <any command>Every tmux command works from the shell$ tmux lsk -N | lessBrowse all keybindings with notes$ tmux customize-modeInteractive options browser$ tmux wait-for channelSynchronize scripts with tmux eventsThe stuff cheat sheets can't fix
The keys are the easy part. These guides fix the things people actually fight with: