Tmux Commands & Terminal Multiplexer Cheat Sheet
The definitive Tmux quick reference: create/attach sessions, split panes horizontally/vertically, zoom panes, copy-mode buffer navigation, and custom configs with 1-click copy.
Sessions Management (5 commands)
tmux new -s <session_name>
Creates a new named tmux session in the background or terminal.
tmux ls
Lists all currently running tmux sessions and their attached status.
tmux attach -t <session_name>
Attaches your terminal to an existing named session.
tmux kill-session -t <session_name>
Terminates an active session and all processes running within its windows.
Ctrl+b d
Detaches from the current session, leaving all background tasks executing.
Windows (Tabs) (5 commands)
Ctrl+b c
Creates a brand-new window (tab) inside the current active session.
Ctrl+b ,
Renames the current active window.
Ctrl+b n / Ctrl+b p
Switches to the next (n) or previous (p) window in the session.
Ctrl+b w
Opens an interactive visual tree list of all sessions and windows.
Ctrl+b &
Kills the current active window (prompts for confirmation y/n).
Panes (Split Screen) (7 commands)
Ctrl+b %
Splits the current active pane vertically into left and right columns.
Ctrl+b "
Splits the current active pane horizontally into top and bottom rows.
Ctrl+b <Arrow Keys>
Navigates cursor focus between adjacent panes (Up, Down, Left, Right).
Ctrl+b z
Zooms (maximizes) the current pane to full screen; press again to restore split.
Ctrl+b x
Kills the current active pane (prompts for confirmation).
Ctrl+b { / Ctrl+b }
Swaps the position of the current pane with the previous or next pane.
Ctrl+b q
Briefly displays pane numbers on screen; press the digit to jump there.
Copy Mode & Scrolling (3 commands)
Ctrl+b [
Enters copy/scrollback mode: scroll through terminal history with arrows or PageUp/Down.
Ctrl+b ]
Pastes text previously copied from tmux buffer into the active pane.
set -g mouse on
Enables mouse support: click to focus panes, drag to resize, wheel to scroll.
Configuration & Customization (2 commands)
tmux source-file ~/.tmux.conf
Reloads tmux configuration file without restarting running sessions.
set -g prefix C-a
Changes default prefix from Ctrl+b to Ctrl+a (popular screen compatibility option).