Skip to main content

Essential Commands

Search the full tmux command reference — every command with examples, options, and keybindings. Default prefix is Ctrl+b. New to tmux? Start with core concepts to understand the fundamentals.

Verified Jun 2026 for tmux 3.6b
15 min read
intermediate

Showing 40 of 40 commands

Session Management

Window Management

new-window

⌘+c

Short: neww

Create a new window. If -t is given, the new window is created at the specified index. If a shell-command is given, it is executed in the new window.

5 examples6 options

select-window

⌘+0-9, Prefix + n/p, Prefix + l

Short: selectw

Select a window. The window becomes the current window in its session.

3 examples4 options

rename-window

⌘+,

Short: renamew

Rename the current window, or the window specified by -t.

2 examples1 options

kill-window

⌘+&

Short: killw

Kill the current window or the window specified by -t, and all panes within it.

3 examples2 options

list-windows

⌘+w (interactive)

Short: lsw

List windows in a session. With -a, list all windows in all sessions.

2 examples3 options

choose-tree

⌘+s (sessions), Prefix + w (windows)

Open an interactive tree of sessions, windows, and panes to preview and choose one. This is the picker behind the default Prefix + s (sessions) and Prefix + w (windows) bindings.

3 examples5 options

swap-window

N/A (bind to a key)

Short: swapw

Swap two windows so they exchange positions. With -d the active window is not changed to follow the move.

2 examples3 options

move-window

N/A (e.g. bind . command-prompt 'move-window -t %%')

Short: movew

Move a window to a new index, optionally in another session. With -r, renumber all windows in the session to remove gaps in the indexes.

3 examples6 options

respawn-window

N/A

Short: respawnw

Reuse a window to run a command, restarting it in place. Useful for windows whose command exited when remain-on-exit is on.

2 examples3 options

Pane Management

Copy Mode

Miscellaneous

source-file

Often bound to ⌘+r in configs

Short: source

Execute commands from a file. This is typically used to reload the tmux configuration.

2 examples4 options

display-message

N/A

Short: display

Display a message in the status line. If no message is given, display information about the current pane.

3 examples3 options

set-option

⌘+: (then type command)

Short: set

Set a session, window, or server option. Without -g, the option is set for the current session.

4 examples5 options

send-keys

N/A (used in scripts)

Short: send

Send keys to a pane. This is useful for scripting tmux to automate commands.

4 examples5 options

list-keys

⌘+?

Short: lsk

List all key bindings. Shows the key tables (prefix, root, copy-mode, etc.) and their bindings.

3 examples3 options

bind-key

N/A (configuration command)

Short: bind

Bind a key to a command. The key is bound in the prefix table by default.

4 examples4 options

display-popup

⌘+: display-popup (or bind a key)

Short: popup

Open a temporary popup terminal floating above the current client, running a command (a shell by default). Great for quick tools without disturbing your layout.

3 examples8 options

display-menu

N/A (bind to a key)

Short: menu

Display an interactive menu at the given position. Each item has a display name, a shortcut key, and a tmux command to run when chosen.

2 examples5 options

pipe-pane

Often bound, e.g. bind P pipe-pane -o 'cat >>~/#W.log'

Short: pipep

Pipe a pane's output to a shell command for live logging. With no command, any existing pipe is stopped.

2 examples4 options

set-hook

N/A (configuration command)

Set (or unset) a hook that runs a tmux command automatically when an event occurs, such as a session being created or a window being linked. Flags mirror set-option.

2 examples5 options

if-shell

N/A (configuration command)

Short: if

Run the first command if shell-command succeeds, otherwise the optional second command. With -F, no shell runs and the condition is a format that is true unless empty or zero.

2 examples3 options

run-shell

N/A

Short: run

Run a shell command (or, with -C, a tmux command) and show its output in the message line or a popup. Used heavily by plugins.

2 examples4 options

Server

🎨 Customize Prefix Key

The prefix key is the command that tells tmux "hey, listen to the next keypress". By default, it's Ctrl + b. Learn more about customizing this and other settings in the Configuration guide.

bash
# Add to ~/.tmux.conf
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix