_ | |_ _ __ ___ _ ___ __ | __| '_ ` _ \| | | \ \/ / | |_| | | | | | |_| |> < \__|_| |_| |_|\__,_/_/\_\

tmux — Terminal Multiplexer

Split panes · Persist sessions · Navigate without a mouse

Default prefix: Ctrl+b — press this before every shortcut below. Commonly remapped to Ctrl+a
Core concepts
🖥️
Server
Background process that owns all sessions. Starts automatically, survives terminal close.
📁
Session
Top-level workspace. Detach and reattach later. Each session has one or more windows.
📄
Window
Like a browser tab inside a session. Each window fills the full terminal, contains panes.
◻️
Pane
A split region inside a window. Each pane runs its own shell process independently.
Sessions
Session Management
New session (CLI)
tmuxnew -s name
Attach to session (CLI)
tmuxattach -t name
List sessions (CLI)
tmux ls
Kill session (CLI)
tmux kill-session-t name
Detach from session
prefix+d
Switch to next session
prefix+)
Switch to previous session
prefix+(
Rename current session
prefix+$
Session/window chooser
prefix+s
Windows
Window Commands
New window
prefix+c
Next window
prefix+n
Previous window
prefix+p
Select window by number
prefix+0–9
Last (previously used) window
prefix+l
Rename current window
prefix+,
Kill current window
prefix+&
Window list (interactive)
prefix+w
Find window by name
prefix+f
Panes
Split & Navigate
Split vertically (side by side)
prefix+%
Split horizontally (top/bottom)
prefix+"
Move to pane (arrow key)
prefix+↑↓←→
Cycle through panes
prefix+o
Show pane numbers
prefix+q
Jump to pane by number
prefix+qthen0–9
Kill current pane
prefix+x
Zoom pane (toggle full screen)
prefix+z
Convert pane to window
prefix+!
Swap pane with previous
prefix+{
Swap pane with next
prefix+}
Resize Panes
Resize up (small step)
prefix+Ctrl+
Resize down (small step)
prefix+Ctrl+
Resize left (small step)
prefix+Ctrl+
Resize right (small step)
prefix+Ctrl+
Resize up (large step)
prefix+Alt+
Resize down (large step)
prefix+Alt+
Cycle pane layouts
prefix+Space
Layouts
Even-horizontal (side by side)
prefix+Alt+1
Even-vertical (top/bottom)
prefix+Alt+2
Main pane horizontal
prefix+Alt+3
Main pane vertical
prefix+Alt+4
Tiled (equal grid)
prefix+Alt+5
Copy Mode & Scrollback
Copy Mode (vi)
Enter copy mode
prefix+[
Start selection (vi mode)
Space
Copy selection
Enter
Paste buffer
prefix+]
Quit copy mode
q
Search forward
/
Search backward
?
Scroll up half page
Ctrl+u
Scroll down half page
Ctrl+d
Show paste buffers
prefix+#
Miscellaneous
Other Commands
Command prompt
prefix+:
List key bindings
prefix+?
Reload config file
prefix+:source-file ~/.tmux.conf
Show clock
prefix+t
Toggle mouse on/off
prefix+:set mouse
Kill tmux server
tmux kill-server

Click a pane to make it active. Use the buttons below to simulate tmux actions.

Terminal — tmux
Recommended ~/.tmux.conf
Prefix & Basics
unbind C-bRemove the default Ctrl+b prefix
set -g prefix C-aSet prefix to Ctrl+a (screen-style, easier to reach)
bind C-a send-prefixAllow sending Ctrl+a to applications (press twice)
set -g base-index 1Start window numbering at 1 instead of 0
set -g pane-base-index 1Start pane numbering at 1 as well
set -g renumber-windows onAuto-renumber windows when one is closed
set -sg escape-time 0No delay after pressing Escape (important for vim users)
Mouse & Terminal
set -g mouse onEnable mouse support — click to select panes/windows, scroll
set -g default-terminal "tmux-256color"Use 256-colour terminal type for proper colour support
set -ga terminal-overrides ",*256col*:Tc"Enable true colour (24-bit) passthrough for apps like neovim
set -g history-limit 5000050k lines of scrollback buffer per pane (default is 2000)
Vi Mode & Copy
setw -g mode-keys viUse vi key bindings in copy mode
bind-key -T copy-mode-vi v send -X begin-selectionPress v to start visual selection (like vim)
bind-key -T copy-mode-vi y send -X copy-selection-and-cancelPress y to yank (copy) selection
bind P paste-bufferBind prefix+P to paste (capital P to avoid conflicts)
Intuitive Splits
bind | split-window -h -c "#{pane_current_path}"Split vertically with |, keeping current directory
bind - split-window -v -c "#{pane_current_path}"Split horizontally with -, keeping current directory
unbind '"'Remove old horizontal split binding
unbind %Remove old vertical split binding
Pane Navigation (vim-style)
bind h select-pane -LMove to left pane with prefix+h
bind j select-pane -DMove to pane below with prefix+j
bind k select-pane -UMove to pane above with prefix+k
bind l select-pane -RMove to right pane with prefix+l
bind r source-file ~/.tmux.conf \; display "Reloaded!"Reload config with prefix+r
Status Bar
set -g status-style "bg=#1e1e2e,fg=#cdd6f4"Dark Catppuccin-style background for status bar
set -g status-left "#[fg=#89b4fa,bold] [#S] "Show session name in blue on the left
set -g status-right "#[fg=#a6e3a1] %H:%M #[fg=#89b4fa] %Y-%m-%d "Clock and date on the right in green/blue
set -g status-interval 5Refresh status bar every 5 seconds
set -g window-status-current-format "#[fg=#f38ba8,bold] #I:#W "Active window tab in red/bold
Plugin Manager (tpm)
Popular Plugins via tpm
set -g @plugin 'tmux-plugins/tpm'Tmux Plugin Manager — bootstraps everything below
set -g @plugin 'tmux-plugins/tmux-sensible'Sensible defaults everyone can agree on
set -g @plugin 'tmux-plugins/tmux-resurrect'Save and restore sessions across reboots
set -g @plugin 'tmux-plugins/tmux-continuum'Auto-save sessions every 15 minutes
set -g @plugin 'tmux-plugins/tmux-yank'Copy to system clipboard from copy mode
set -g @plugin 'christoomey/vim-tmux-navigator'Seamless vim+tmux pane navigation with Ctrl+hjkl
run '~/.tmux/plugins/tpm/tpm'Always keep this as the LAST line in .tmux.conf
Install tpm: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm — then press prefix + I inside tmux to install plugins.
Timeline
2007
tmux Born
Nicholas Marriott releases tmux 0.8 as an alternative to GNU Screen. Written in C, BSD-licensed, it brings a clean client-server architecture and a scriptable command interface missing from Screen.
2009
OpenBSD Adoption
tmux is added to the OpenBSD base system, replacing Screen. This gives it immediate credibility in the Unix community and drives rapid feature development from security-focused contributors.
2011
tmux 1.5 — Activity & Alerts
Adds window activity monitoring, bell alerts, and significant improvements to copy mode. The pane synchronization feature (broadcast input to all panes) debuts — a power-user favourite for multi-server management.
2012
tpm — Tmux Plugin Manager
Bruno Sutic creates tpm, inspired by vim's Vundle/Pathogen. Plugins like tmux-resurrect and tmux-continuum follow, enabling persistent session save/restore — solving one of terminal multiplexing's biggest pain points.
2014
tmux 1.9 — Path Inheritance
New panes and windows can now inherit the current working directory of the active pane, a highly requested feature. The pane_current_path format variable enables the now-standard split binding pattern.
2015
tmux 2.0 — True Color & UTF-8
Version 2.0 ships with true colour support and better UTF-8 rendering. This makes tmux viable for modern terminal applications that rely on 24-bit colour — including popular editors like Neovim.
2017
tmux 2.6 — Popup Windows
Floating overlay panes (display-popup) land, allowing scripts and plugins to open temporary windows on top of the current layout — used heavily by modern fuzzy-finder integrations like fzf-tmux.
2019
tmux 2.9 — Style Unification
A major refactor of the style and format system makes theming dramatically easier. Catppuccin, Dracula, and Gruvbox themes emerge as community staples, fuelling a resurgence of aesthetic tmux customisation.
2021
tmux 3.2 — Extended Keys & Menus
Adds support for extended key sequences (allowing modifiers like Shift+arrows in more terminals), and interactive menus via display-menu. Mouse right-click menus become a standard tmux interaction pattern.
2023
tmux 3.4 — Window Options & Passthrough
Improved OSC passthrough lets applications like kitty, Ghostty, and iTerm2 render inline images through tmux — finally closing the gap between multiplexed and raw-terminal image rendering.
Today
17+ Years of Multiplexing
tmux is installed on virtually every Linux server, embedded in developer workflows from Neovim to VS Code remote sessions. With ~35k GitHub stars and active maintenance, it remains the definitive terminal multiplexer.