tmux Cheatsheet
Session, window, and pane management at your fingertips.
Sessions
tmuxStart a new session with a default name.
tmux new -s <name>Start a new named session.
tmux new -A -s <name>Attach to session or create it if missing.
tmux lsList sessions.
tmux attach -t <name>Attach to a session.
tmux rename-session -t <name> <new>Rename a session from the CLI.
C-b $Rename current session.
C-b sList sessions and switch interactively.
C-b ( / C-b )Previous / next session.
C-b dDetach from current session.
tmux kill-session -t <name>Kill a session.
tmux kill-serverStop all tmux sessions.
Windows
C-b cCreate a new window.
C-b ,Rename current window.
C-b p / C-b nPrevious / next window.
C-b lJump to last active window.
C-b <number>Jump to window number.
C-b wList windows and select one interactively.
C-b .Move current window to a new index.
C-b &Close current window.
Panes
C-b %Split vertically.
C-b "Split horizontally.
C-b ←/↑/→/↓Move between panes with arrow keys.
C-b oCycle through panes.
C-b qShow pane numbers briefly.
C-b { / C-b }Swap current pane with previous / next.
C-b xClose current pane.
C-b zToggle zoom for current pane.
C-b :resize-pane -L/R/U/D <n>Resize panes via command prompt.
Layouts
C-b SpaceCycle through preset layouts.
C-b :select-layout even-horizontalSplit panes into equal horizontal rows.
C-b :select-layout even-verticalSplit panes into equal vertical columns.
C-b :select-layout main-verticalLarge main pane on the left with side panes.
Copy Mode and Scrollback
C-b [Enter copy mode (scrollback).
PgUp/PgDnScroll up / down in copy mode.
SpaceStart selection in copy mode.
EnterCopy selection to buffer and exit copy mode.
qExit copy mode without copying.
C-b ]Paste last copied buffer.
Buffers
C-b =Choose a buffer to paste.
C-b :list-buffersShow all buffers with sizes.
C-b :save-buffer <file>Save the latest buffer to a file.
C-b :delete-buffer -b <n>Delete a specific buffer.
Options and Config
~/.tmux.confMain configuration file.
set -g mouse onEnable mouse support for pane selection and scroll.
set -g history-limit 50000Increase scrollback buffer size.
tmux source-file ~/.tmux.confReload config without restarting tmux.
Misc Essentials
C-b :Open tmux command prompt.
C-b ?Show key bindings help.
C-b tShow a big clock (handy for breaks).