Copy mode lets tmux freeze the current pane view, move through pane history, and copy text into tmux's own paste buffer without leaving the session. It is the built-in way to review long command output, logs, or scrollback when the pane is still busy.

By default, tmux uses the emacs-style copy mode key table, so the normal flow is Ctrl-b then [ to enter copy mode, the cursor and search keys to move, and Alt-w to copy the selection and exit. If the window option mode-keys is set to vi, tmux switches to the copy-mode-vi key table instead.

The common failure case is using the wrong key table for the current window. If Ctrl-Space or Alt-w does nothing, check whether the window is using vi bindings before assuming copy mode is broken, and remember that tmux copies into its own paste buffer unless clipboard integration has been configured separately.

Steps to use copy mode in tmux:

  1. Press your tmux prefix key and then press [ to enter copy mode in the active pane.
    Ctrl-b [

    With the default configuration the prefix key is Ctrl-b. Press q to leave copy mode without copying anything.

  2. Move to the start of the text you want to copy with the default emacs-style movement keys.
    Up Down PageUp PageDown Ctrl-r Ctrl-s

    Ctrl-r searches upward, Ctrl-s searches downward, Left and Right move by character, Ctrl-a and Ctrl-e jump to the start or end of the line, and Alt-b and Alt-f move by word.

  3. Start the selection at the current cursor position.
    Ctrl-Space
  4. Move to the end of the text you want to copy while the selection stays active.
  5. Copy the selection into tmux and leave copy mode.
    Alt-w

    The copied text is stored in tmux's paste buffer, so it can be pasted into another tmux pane even if your terminal emulator clipboard is separate.

  6. Paste the most recent tmux buffer into a safe prompt or editor if you want to confirm the copy immediately.
    Ctrl-b ]

    Paste into a safe location first. If the copied text contains shell syntax or a trailing newline, pressing Enter afterwards can run it.

  7. Check which key table the current window is using if the default selection keys do not match what you see.
    $ tmux show-window-options -gv mode-keys
    emacs

    If this returns vi, use Space to begin a selection, Enter to copy and exit, Escape to clear a selection, and h j k l / ? n N g G b w 0 $ to move around the history.