Home /
Cheatsheets /
tmux Cheatsheet tmux Cheatsheet By Dejan Panovski
• Updated on Feb 2, 2026
•
Download PDF
Print Quick reference for tmux sessions, windows, panes, and common commands
tmux is a terminal multiplexer that lets you manage multiple sessions, windows, and panes in a single terminal. This cheatsheet covers the most common commands and key bindings.
Start and Exit # Command Description tmuxStart a new session tmux new -s workStart session named work tmux lsList sessions tmux kill-session -t workKill session work tmux kill-serverStop tmux server exitExit current shell (pane)
Attach and Switch # Key / Command Description tmux attachAttach to the most recent session from the shell tmux attach -t workAttach to session work from the shell Ctrl+b sChoose a session from the session list Ctrl+b (Switch to the previous session Ctrl+b )Switch to the next session Ctrl+b dDetach from the current session
Prefix Key # Default prefix is Ctrl+b.
Key Description Ctrl+bEnter tmux command mode Ctrl+b ?Show key bindings Ctrl+b :Open command prompt
Windows # Key / Command Description Ctrl+b cCreate new window Ctrl+b ,Rename current window Ctrl+b &Kill current window Ctrl+b nNext window Ctrl+b pPrevious window Ctrl+b 0-9Switch to window by number
Panes # Key Description Ctrl+b %Split pane vertically Ctrl+b "Split pane horizontally Ctrl+b xKill current pane Ctrl+b oCycle panes Ctrl+b qShow pane numbers Ctrl+b ;Toggle last active pane Ctrl+b zZoom/unzoom pane
Pane Navigation # Key Description Ctrl+b ←/→/↑/↓Move between panes Ctrl+b Ctrl+←/→/↑/↓Resize the current pane Ctrl+b Alt+1Select the even-horizontal layout Ctrl+b Alt+2Select the even-vertical layout Ctrl+b Alt+5Select the tiled layout
Copy Mode # Key Description Ctrl+b [Enter copy mode qExit copy mode SpaceStart selection EnterCopy selection Ctrl+b ]Paste buffer
Common Commands # Command Description tmux rename-session -t work newnameRename session tmux new -s work -dStart detached session tmux rename-window -t 1 editorRename window 1 tmux kill-pane -t 2Kill pane 2 tmux list-keysList all key bindings
Configuration # File / Command Description ~/.tmux.confUser config file tmux source-file ~/.tmux.confReload config set -g mouse onEnable mouse mode setw -g mode-keys viUse vi keys in copy mode
Useful Patterns # Pattern Description tmux new -s work -d \; new-window -t work:2 \; attach -t workCreate session, window, attach tmux ls | catSimple list for scripts tmux has-session -t workCheck if session exists