{
    "content": [
        {
            "type": "text",
            "text": "# TMUX(1) (man)\n\n**Summary:** tmux — terminal multiplexer\n\n**Synopsis:** tmux [-2CDluvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [-T features]\n[command [flags]]\n\n## Examples\n\n- `To create a new tmux session running vi(1):`\n- `$ tmux new-session vi`\n- `Most commands have a shorter form, known as an alias.  For new-session, this is new:`\n- `$ tmux new vi`\n- `Alternatively, the shortest unambiguous form of a command is accepted.  If there are several`\n- `options, they are listed:`\n- `$ tmux n`\n- `ambiguous command: n, could be: new-session, new-window, next-window`\n- `Within an active session, a new window may be created by typing ‘C-b c’ (Ctrl followed by the`\n- `‘b’ key followed by the ‘c’ key).`\n- `Windows may be navigated with: ‘C-b 0’ (to select window 0), ‘C-b 1’ (to select window 1), and`\n- `so on; ‘C-b n’ to select the next window; and ‘C-b p’ to select the previous window.`\n- `A session may be detached using ‘C-b d’ (or by an external event such as ssh(1) disconnection)`\n- `and reattached with:`\n- `$ tmux attach-session`\n- `Typing ‘C-b ?’ lists the current key bindings in the current window; up and down may be used to`\n- `navigate the list or ‘q’ to exit from it.`\n- `Commands to be run when the tmux server is started may be placed in the ~/.tmux.conf configura‐`\n- `tion file.  Common examples include:`\n- `Changing the default prefix key:`\n- `set-option -g prefix C-a`\n- `unbind-key C-b`\n- `bind-key C-a send-prefix`\n- `Turning the status line off, or changing its colour:`\n- `set-option -g status off`\n- `set-option -g status-style bg=blue`\n- `Setting other options, such as the default command, or locking after 30 minutes of inactivity:`\n- `set-option -g default-command \"exec /bin/ksh\"`\n- `set-option -g lock-after-time 1800`\n- `Creating new key bindings:`\n- `bind-key b set-option status`\n- `bind-key / command-prompt \"split-window 'exec man %%'\"`\n- `bind-key S command-prompt \"new-window -n %1 'ssh %1'\"`\n\n## See Also\n\n- pty(4)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (27 lines) — 13 subsections\n  - -2 -T (2 lines)\n  - -C -CC (2 lines)\n  - -c (4 lines)\n  - -D (2 lines)\n  - -f (11 lines)\n  - -L (12 lines)\n  - -l (2 lines)\n  - -N (2 lines)\n  - -S (3 lines)\n  - -u (3 lines)\n  - -T (2 lines)\n  - -v (8 lines)\n  - -V (5 lines)\n- **DEFAULT KEY BINDINGS** (69 lines)\n- **COMMAND PARSING AND EXECUTION** (47 lines)\n- **PARSING SYNTAX** (129 lines)\n- **COMMANDS** (49 lines) — 2 subsections\n  - Token              Meaning (11 lines)\n  - Token                  Meaning (79 lines)\n- **CLIENTS AND SESSIONS** (67 lines) — 2 subsections\n  - kill-server (131 lines)\n  - start-server (32 lines)\n- **WINDOWS AND PANES** (111 lines) — 5 subsections\n  - -i (45 lines)\n  - even-horizontal (2 lines)\n  - even-vertical (2 lines)\n  - main-horizontal (4 lines)\n  - main-vertical (438 lines)\n- **KEY BINDINGS** (68 lines)\n- **OPTIONS** (626 lines)\n- **HOOKS** (72 lines)\n- **MOUSE SUPPORT** (38 lines)\n- **FORMATS** (89 lines) — 1 subsections\n  - Variable name          Alias    Replaced with (179 lines)\n- **STYLES** (8 lines) — 3 subsections\n  - fg=colour (6 lines)\n  - bg=colour (13 lines)\n  - fill=colour (26 lines)\n- **NAMES AND TITLES** (27 lines)\n- **GLOBAL AND SESSION ENVIRONMENT** (31 lines)\n- **STATUS LINE** (181 lines)\n- **BUFFERS** (102 lines)\n- **MISCELLANEOUS** (15 lines) — 1 subsections\n  - lock-server (20 lines)\n- **EXIT MESSAGES** (26 lines)\n- **TERMINFO EXTENSIONS** (64 lines)\n- **CONTROL MODE** (64 lines) — 1 subsections\n  - %sessions-changed (22 lines)\n- **ENVIRONMENT** (34 lines)\n- **FILES** (3 lines)\n- **EXAMPLES** (53 lines)\n- **SEE ALSO** (2 lines)\n- **AUTHORS** (3 lines)\n\n## Full Content\n\n### NAME\n\ntmux — terminal multiplexer\n\n### SYNOPSIS\n\ntmux [-2CDluvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [-T features]\n[command [flags]]\n\n### DESCRIPTION\n\ntmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and\ncontrolled from a single screen.  tmux may be detached from a screen and continue running in\nthe background, then later reattached.\n\nWhen tmux is started it creates a new session with a single window and displays it on screen.\nA status line at the bottom of the screen shows information on the current session and is used\nto enter interactive commands.\n\nA session is a single collection of pseudo terminals under the management of tmux.  Each ses‐\nsion has one or more windows linked to it.  A window occupies the entire screen and may be\nsplit into rectangular panes, each of which is a separate pseudo terminal (the pty(4) manual\npage documents the technical details of pseudo terminals).  Any number of tmux instances may\nconnect to the same session, and any number of windows may be present in the same session.\nOnce all sessions are killed, tmux exits.\n\nEach session is persistent and will survive accidental disconnection (such as ssh(1) connection\ntimeout) or intentional detaching (with the ‘C-b d’ key strokes).  tmux may be reattached us‐\ning:\n\n$ tmux attach\n\nIn tmux, a session is displayed on screen by a client and all sessions are managed by a single\nserver.  The server and each client are separate processes which communicate through a socket\nin /tmp.\n\nThe options are as follows:\n\n#### -2 -T\n\n256.\n\n#### -C -CC\n\necho.\n\n#### -c\n\nExecute shell-command using the default shell.  If necessary, the tmux server\nwill be started to retrieve the default-shell option.  This option is for compat‐\nibility with sh(1) when tmux is used as a login shell.\n\n#### -D\n\noff.  With -D, command may not be specified.\n\n#### -f\n\nconfiguration file from /etc/tmux.conf, if present, then looks for a user config‐\nuration file at ~/.tmux.conf.\n\nThe configuration file is a set of tmux commands which are executed in sequence\nwhen the server is first started.  tmux loads configuration files once when the\nserver process has started.  The source-file command may be used to load a file\nlater.\n\ntmux shows any error messages from commands in configuration files in the first\nsession created, and continues to process the rest of the configuration file.\n\n#### -L\n\ntmux stores the server socket in a directory under TMUXTMPDIR or /tmp if it is\nunset.  The default socket is named default.  This option allows a different\nsocket name to be specified, allowing several independent tmux servers to be run.\nUnlike -S a full path is not necessary: the sockets are all created in a direc‐\ntory tmux-UID under the directory given by TMUXTMPDIR or in /tmp.  The tmux-UID\ndirectory is created by tmux and must not be world readable, writable or exe‐\ncutable.\n\nIf the socket is accidentally removed, the SIGUSR1 signal may be sent to the tmux\nserver process to recreate it (note that this will fail if any parent directories\nare missing).\n\n#### -l\n\nbility with other shells when using tmux as a login shell.\n\n#### -N\n\nnew-session or start-server).\n\n#### -S\n\nSpecify a full alternative path to the server socket.  If -S is specified, the\ndefault socket directory is not used and any -L flag is ignored.\n\n#### -u\n\nLCALL, LCCTYPE, or LANG that is set does not contain \"UTF-8\" or \"UTF8\".  This\nis equivalent to -T UTF-8.\n\n#### -T\n\ntures.  See the terminal-features option.\n\n#### -v\n\ntmux-server-PID.log files in the current directory, where PID is the PID of the\nserver or client process.  If -v is specified twice, an additional\ntmux-out-PID.log file is generated with a copy of everything tmux writes to the\nterminal.\n\nThe SIGUSR2 signal may be sent to the tmux server process to toggle logging be‐\ntween on (as if -v was given) and off.\n\n#### -V\n\ncommand [flags]\nThis specifies one of a set of commands used to control tmux, as described in the\nfollowing sections.  If no commands are specified, the new-session command is as‐\nsumed.\n\n### DEFAULT KEY BINDINGS\n\ntmux may be controlled from an attached client by using a key combination of a prefix key,\n‘C-b’ (Ctrl-b) by default, followed by a command key.\n\nThe default command key bindings are:\n\nC-b         Send the prefix key (C-b) through to the application.\nC-o         Rotate the panes in the current window forwards.\nC-z         Suspend the tmux client.\n!           Break the current pane out of the window.\n\"           Split the current pane into two, top and bottom.\n#           List all paste buffers.\n$           Rename the current session.\n%           Split the current pane into two, left and right.\n&           Kill the current window.\n'           Prompt for a window index to select.\n(           Switch the attached client to the previous session.\n)           Switch the attached client to the next session.\n,           Rename the current window.\n-           Delete the most recently copied buffer of text.\n.           Prompt for an index to move the current window.\n0 to 9      Select windows 0 to 9.\n:           Enter the tmux command prompt.\n;           Move to the previously active pane.\n=           Choose which buffer to paste interactively from a list.\n?           List all key bindings.\nD           Choose a client to detach.\nL           Switch the attached client back to the last session.\n[           Enter copy mode to copy text or view the history.\n]           Paste the most recently copied buffer of text.\nc           Create a new window.\nd           Detach the current client.\nf           Prompt to search for text in open windows.\ni           Display some information about the current window.\nl           Move to the previously selected window.\nm           Mark the current pane (see select-pane -m).\nM           Clear the marked pane.\nn           Change to the next window.\no           Select the next pane in the current window.\np           Change to the previous window.\nq           Briefly display pane indexes.\nr           Force redraw of the attached client.\ns           Select a new session for the attached client interactively.\nt           Show the time.\nw           Choose the current window interactively.\nx           Kill the current pane.\nz           Toggle zoom state of the current pane.\n{           Swap the current pane with the previous pane.\n}           Swap the current pane with the next pane.\n~           Show previous messages from tmux, if any.\nPage Up     Enter copy mode and scroll one page up.\nUp, Down\nLeft, Right\nChange to the pane above, below, to the left, or to the right of the current\npane.\nM-1 to M-5  Arrange panes in one of the five preset layouts: even-horizontal, even-verti‐\ncal, main-horizontal, main-vertical, or tiled.\nSpace       Arrange the current window in the next preset layout.\nM-n         Move to the next window with a bell or activity marker.\nM-o         Rotate the panes in the current window backwards.\nM-p         Move to the previous window with a bell or activity marker.\nC-Up, C-Down\nC-Left, C-Right\nResize the current pane in steps of one cell.\nM-Up, M-Down\nM-Left, M-Right\nResize the current pane in steps of five cells.\n\nKey bindings may be changed with the bind-key and unbind-key commands.\n\n### COMMAND PARSING AND EXECUTION\n\ntmux supports a large number of commands which can be used to control its behaviour.  Each com‐\nmand is named and can accept zero or more flags and arguments.  They may be bound to a key with\nthe bind-key command or run from the shell prompt, a shell script, a configuration file or the\ncommand prompt.  For example, the same set-option command run from the shell prompt, from\n~/.tmux.conf and bound to a key may look like:\n\n$ tmux set-option -g status-style bg=cyan\n\nset-option -g status-style bg=cyan\n\nbind-key C set-option -g status-style bg=cyan\n\nHere, the command name is ‘set-option’, ‘-g’ is a flag and ‘status-style’ and ‘bg=cyan’ are ar‐\nguments.\n\ntmux distinguishes between command parsing and execution.  In order to execute a command, tmux\nneeds it to be split up into its name and arguments.  This is command parsing.  If a command is\nrun from the shell, the shell parses it; from inside tmux or from a configuration file, tmux\ndoes.  Examples of when tmux parses commands are:\n\n-   in a configuration file;\n\n-   typed at the command prompt (see command-prompt);\n\n-   given to bind-key;\n\n-   passed as arguments to if-shell or confirm-before.\n\nTo execute commands, each client has a ‘command queue’.  A global command queue not attached to\nany client is used on startup for configuration files like ~/.tmux.conf.  Parsed commands added\nto the queue are executed in order.  Some commands, like if-shell and confirm-before, parse\ntheir argument to create a new command which is inserted immediately after themselves.  This\nmeans that arguments can be parsed twice or more - once when the parent command (such as\nif-shell) is parsed and again when it parses and executes its command.  Commands like if-shell,\nrun-shell and display-panes stop execution of subsequent commands on the queue until something\nhappens - if-shell and run-shell until a shell command finishes and display-panes until a key\nis pressed.  For example, the following commands:\n\nnew-session; new-window\nif-shell \"true\" \"split-window\"\nkill-session\n\nWill execute new-session, new-window, if-shell, the shell command true(1), split-window and\nkill-session in that order.\n\nThe COMMANDS section lists the tmux commands and their arguments.\n\n### PARSING SYNTAX\n\nThis section describes the syntax of commands parsed by tmux, for example in a configuration\nfile or at the command prompt.  Note that when commands are entered into the shell, they are\nparsed by the shell - see for example ksh(1) or csh(1).\n\nEach command is terminated by a newline or a semicolon (;).  Commands separated by semicolons\ntogether form a ‘command sequence’ - if a command in the sequence encounters an error, no sub‐\nsequent commands are executed.\n\nIt is recommended that a semicolon used as a command separator should be written as an individ‐\nual token, for example from sh(1):\n\n$ tmux neww \\; splitw\n\nOr:\n\n$ tmux neww ';' splitw\n\nOr from the tmux command prompt:\n\nneww ; splitw\n\nHowever, a trailing semicolon is also interpreted as a command separator, for example in these\nsh(1) commands:\n\n$ tmux neww\\\\; splitw\n\nOr:\n\n$ tmux 'neww;' splitw\n\nAs in these examples, when running tmux from the shell extra care must be taken to properly\nquote semicolons:\n\n1.   Semicolons that should be interpreted as a command separator should be escaped ac‐\ncording to the shell conventions.  For sh(1) this typically means quoted (such as\n‘neww ';' splitw’) or escaped (such as ‘neww \\\\\\\\; splitw’).\n\n2.   Individual semicolons or trailing semicolons that should be interpreted as arguments\nshould be escaped twice: once according to the shell conventions and a second time\nfor tmux; for example:\n\n$ tmux neww 'foo\\\\;' bar\n$ tmux neww foo\\\\\\\\; bar\n\n3.   Semicolons that are not individual tokens or trailing another token should only be\nescaped once according to shell conventions; for example:\n\n$ tmux neww 'foo-;-bar'\n$ tmux neww foo-\\\\;-bar\n\nComments are marked by the unquoted # character - any remaining text after a comment is ignored\nuntil the end of the line.\n\nIf the last character of a line is \\, the line is joined with the following line (the \\ and the\nnewline are completely removed).  This is called line continuation and applies both inside and\noutside quoted strings and in comments, but not inside braces.\n\nCommand arguments may be specified as strings surrounded by single (') quotes, double quotes\n(\") or braces ({}).  This is required when the argument contains any special character.  Single\nand double quoted strings cannot span multiple lines except with line continuation.  Braces can\nspan multiple lines.\n\nOutside of quotes and inside double quotes, these replacements are performed:\n\n-   Environment variables preceded by $ are replaced with their value from the global en‐\nvironment (see the GLOBAL AND SESSION ENVIRONMENT section).\n\n-   A leading ~ or ~user is expanded to the home directory of the current or specified\nuser.\n\n-   \\uXXXX or \\uXXXXXXXX is replaced by the Unicode codepoint corresponding to the given\nfour or eight digit hexadecimal number.\n\n-   When preceded (escaped) by a \\, the following characters are replaced: \\e by the es‐\ncape character; \\r by a carriage return; \\n by a newline; and \\t by a tab.\n\n-   \\ooo is replaced by a character of the octal value ooo.  Three octal digits are re‐\nquired, for example \\001.  The largest valid character is \\377.\n\n-   Any other characters preceded by \\ are replaced by themselves (that is, the \\ is re‐\nmoved) and are not treated as having any special meaning - so for example \\; will not\nmark a command sequence and \\$ will not expand an environment variable.\n\nBraces are parsed as a configuration file (so conditions such as ‘%if’ are processed) and then\nconverted into a string.  They are designed to avoid the need for additional escaping when\npassing a group of tmux commands as an argument (for example to if-shell).  These two examples\nproduce an identical command - note that no escaping is needed when using {}:\n\nif-shell true {\ndisplay -p 'brace-dollar-foo: }$foo'\n}\n\nif-shell true \"display -p 'brace-dollar-foo: }\\$foo'\"\n\nBraces may be enclosed inside braces, for example:\n\nbind x if-shell \"true\" {\nif-shell \"true\" {\ndisplay \"true!\"\n}\n}\n\nEnvironment variables may be set by using the syntax ‘name=value’, for example\n‘HOME=/home/user’.  Variables set during parsing are added to the global environment.  A hidden\nvariable may be set with ‘%hidden’, for example:\n\n%hidden MYVAR=42\n\nHidden variables are not passed to the environment of processes created by tmux.  See the\nGLOBAL AND SESSION ENVIRONMENT section.\n\nCommands may be parsed conditionally by surrounding them with ‘%if’, ‘%elif’, ‘%else’ and\n‘%endif’.  The argument to ‘%if’ and ‘%elif’ is expanded as a format (see FORMATS) and if it\nevaluates to false (zero or empty), subsequent text is ignored until the closing ‘%elif’,\n‘%else’ or ‘%endif’.  For example:\n\n%if \"#{==:#{host},myhost}\"\nset -g status-style bg=red\n%elif \"#{==:#{host},myotherhost}\"\nset -g status-style bg=green\n%else\nset -g status-style bg=blue\n%endif\n\nWill change the status line to red if running on ‘myhost’, green if running on ‘myotherhost’,\nor blue if running on another host.  Conditionals may be given on one line, for example:\n\n%if #{==:#{host},myhost} set -g status-style bg=red %endif\n\n### COMMANDS\n\nThis section describes the commands supported by tmux.  Most commands accept the optional -t\n(and sometimes -s) argument with one of target-client, target-session, target-window, or\ntarget-pane.  These specify the client, session, window or pane which a command should affect.\n\ntarget-client should be the name of the client, typically the pty(4) file to which the client\nis connected, for example either of /dev/ttyp1 or ttyp1 for the client attached to /dev/ttyp1.\nIf no client is specified, tmux attempts to work out the client currently in use; if that\nfails, an error is reported.  Clients may be listed with the list-clients command.\n\ntarget-session is tried as, in order:\n\n1.   A session ID prefixed with a $.\n\n2.   An exact name of a session (as listed by the list-sessions command).\n\n3.   The start of a session name, for example ‘mysess’ would match a session named\n‘mysession’.\n\n4.   An fnmatch(3) pattern which is matched against the session name.\n\nIf the session name is prefixed with an ‘=’, only an exact match is accepted (so ‘=mysess’ will\nonly match exactly ‘mysess’, not ‘mysession’).\n\nIf a single session is found, it is used as the target session; multiple matches produce an er‐\nror.  If a session is omitted, the current session is used if available; if no current session\nis available, the most recently used is chosen.\n\ntarget-window (or src-window or dst-window) specifies a window in the form session:window.\nsession follows the same rules as for target-session, and window is looked for in order as:\n\n1.   A special token, listed below.\n\n2.   A window index, for example ‘mysession:1’ is window 1 in session ‘mysession’.\n\n3.   A window ID, such as @1.\n\n4.   An exact window name, such as ‘mysession:mywindow’.\n\n5.   The start of a window name, such as ‘mysession:mywin’.\n\n6.   As an fnmatch(3) pattern matched against the window name.\n\nLike sessions, a ‘=’ prefix will do an exact match only.  An empty window name specifies the\nnext unused index if appropriate (for example the new-window and link-window commands) other‐\nwise the current window in session is chosen.\n\nThe following special tokens are available to indicate particular windows.  Each has a single-\ncharacter alternative form.\n\n#### Token              Meaning\n\n{start}       ^    The lowest-numbered window\n{end}         $    The highest-numbered window\n{last}        !    The last (previously current) window\n{next}        +    The next window by number\n{previous}    -    The previous window by number\n\ntarget-pane (or src-pane or dst-pane) may be a pane ID or takes a similar form to target-window\nbut with the optional addition of a period followed by a pane index or pane ID, for example:\n‘mysession:mywindow.1’.  If the pane index is omitted, the currently active pane in the speci‐\nfied window is used.  The following special tokens are available for the pane index:\n\n#### Token                  Meaning\n\n{last}            !    The last (previously active) pane\n{next}            +    The next pane by number\n{previous}        -    The previous pane by number\n{top}                  The top pane\n{bottom}               The bottom pane\n{left}                 The leftmost pane\n{right}                The rightmost pane\n{top-left}             The top-left pane\n{top-right}            The top-right pane\n{bottom-left}          The bottom-left pane\n{bottom-right}         The bottom-right pane\n{up-of}                The pane above the active pane\n{down-of}              The pane below the active pane\n{left-of}              The pane to the left of the active pane\n{right-of}             The pane to the right of the active pane\n\nThe tokens ‘+’ and ‘-’ may be followed by an offset, for example:\n\nselect-window -t:+2\n\nIn addition, target-session, target-window or target-pane may consist entirely of the token\n‘{mouse}’ (alternative form ‘=’) to specify the session, window or pane where the most recent\nmouse event occurred (see the MOUSE SUPPORT section) or ‘{marked}’ (alternative form ‘~’) to\nspecify the marked pane (see select-pane -m).\n\nSessions, window and panes are each numbered with a unique ID; session IDs are prefixed with a\n‘$’, windows with a ‘@’, and panes with a ‘%’.  These are unique and are unchanged for the life\nof the session, window or pane in the tmux server.  The pane ID is passed to the child process\nof the pane in the TMUXPANE environment variable.  IDs may be displayed using the\n‘sessionid’, ‘windowid’, or ‘paneid’ formats (see the FORMATS section) and the\ndisplay-message, list-sessions, list-windows or list-panes commands.\n\nshell-command arguments are sh(1) commands.  This may be a single argument passed to the shell,\nfor example:\n\nnew-window 'vi ~/.tmux.conf'\n\nWill run:\n\n/bin/sh -c 'vi ~/.tmux.conf'\n\nAdditionally, the new-window, new-session, split-window, respawn-window and respawn-pane com‐\nmands allow shell-command to be given as multiple arguments and executed directly (without ‘sh\n-c’).  This can avoid issues with shell quoting.  For example:\n\n$ tmux new-window vi ~/.tmux.conf\n\nWill run vi(1) directly without invoking the shell.\n\ncommand [arguments] refers to a tmux command, either passed with the command and arguments sep‐\narately, for example:\n\nbind-key F1 set-option status off\n\nOr passed as a single string argument in .tmux.conf, for example:\n\nbind-key F1 { set-option status off }\n\nExample tmux commands include:\n\nrefresh-client -t/dev/ttyp2\n\nrename-session -tfirst newname\n\nset-option -wt:0 monitor-activity on\n\nnew-window ; split-window -d\n\nbind-key R source-file ~/.tmux.conf \\; \\\ndisplay-message \"source-file done\"\n\nOr from sh(1):\n\n$ tmux kill-window -t :1\n\n$ tmux new-window \\; split-window -d\n\n$ tmux new-session -d 'vi ~/.tmux.conf' \\; split-window -d \\; attach\n\n### CLIENTS AND SESSIONS\n\nThe tmux server manages clients, sessions, windows and panes.  Clients are attached to sessions\nto interact with them, either when they are created with the new-session command, or later with\nthe attach-session command.  Each session has one or more windows linked into it.  Windows may\nbe linked to multiple sessions and are made up of one or more panes, each of which contains a\npseudo terminal.  Commands for creating, linking and otherwise manipulating windows are covered\nin the WINDOWS AND PANES section.\n\nThe following commands are available to manage clients and sessions:\n\nattach-session [-dErx] [-c working-directory] [-f flags] [-t target-session]\n(alias: attach)\nIf run from outside tmux, create a new client in the current terminal and attach it to\ntarget-session.  If used from inside, switch the current client.  If -d is specified,\nany other clients attached to the session are detached.  If -x is given, send SIGHUP to\nthe parent process of the client as well as detaching the client, typically causing it\nto exit.  -f sets a comma-separated list of client flags.  The flags are:\n\nactive-pane\nthe client has an independent active pane\n\nignore-size\nthe client does not affect the size of other clients\n\nno-output\nthe client does not receive pane output in control mode\n\npause-after=seconds\noutput is paused once the pane is seconds behind in control mode\n\nread-only\nthe client is read-only\n\nwait-exit\nwait for an empty line input before exiting in control mode\n\nA leading ‘!’ turns a flag off if the client is already attached.  -r is an alias for\n-f read-only,ignore-size.  When a client is read-only, only keys bound to the\ndetach-client or switch-client commands have any effect.  A client with the active-pane\nflag allows the active pane to be selected independently of the window's active pane\nused by clients without the flag.  This only affects the cursor position and commands\nissued from the client; other features such as hooks and styles continue to use the\nwindow's active pane.\n\nIf no server is started, attach-session will attempt to start it; this will fail unless\nsessions are created in the configuration file.\n\nThe target-session rules for attach-session are slightly adjusted: if tmux needs to se‐\nlect the most recently used session, it will prefer the most recently used unattached\nsession.\n\n-c will set the session working directory (used for new windows) to working-directory.\n\nIf -E is used, the update-environment option will not be applied.\n\ndetach-client [-aP] [-E shell-command] [-s target-session] [-t target-client]\n(alias: detach)\nDetach the current client if bound to a key, the client specified with -t, or all\nclients currently attached to the session specified by -s.  The -a option kills all but\nthe client given with -t.  If -P is given, send SIGHUP to the parent process of the\nclient, typically causing it to exit.  With -E, run shell-command to replace the\nclient.\n\nhas-session [-t target-session]\n(alias: has)\nReport an error and exit with 1 if the specified session does not exist.  If it does\nexist, exit with 0.\n\n#### kill-server\n\nKill the tmux server and clients and destroy all sessions.\n\nkill-session [-aC] [-t target-session]\nDestroy the given session, closing any windows linked to it and no other sessions, and\ndetaching all clients attached to it.  If -a is given, all sessions but the specified\none is killed.  The -C flag clears alerts (bell, activity, or silence) in all windows\nlinked to the session.\n\nlist-clients [-F format] [-t target-session]\n(alias: lsc)\nList all clients attached to the server.  For the meaning of the -F flag, see the\nFORMATS section.  If target-session is specified, list only clients connected to that\nsession.\n\nlist-commands [-F format] [command]\n(alias: lscm)\nList the syntax of command or - if omitted - of all commands supported by tmux.\n\nlist-sessions [-F format] [-f filter]\n(alias: ls)\nList all sessions managed by the server.  -F specifies the format of each line and -f a\nfilter.  Only sessions for which the filter is true are shown.  See the FORMATS sec‐\ntion.\n\nlock-client [-t target-client]\n(alias: lockc)\nLock target-client, see the lock-server command.\n\nlock-session [-t target-session]\n(alias: locks)\nLock all clients attached to target-session.\n\nnew-session [-AdDEPX] [-c start-directory] [-e environment] [-f flags] [-F format] [-n\nwindow-name] [-s session-name] [-t group-name] [-x width] [-y height] [shell-command]\n(alias: new)\nCreate a new session with name session-name.\n\nThe new session is attached to the current terminal unless -d is given.  window-name\nand shell-command are the name of and shell command to execute in the initial window.\nWith -d, the initial size comes from the global default-size option; -x and -y can be\nused to specify a different size.  ‘-’ uses the size of the current client if any.  If\n-x or -y is given, the default-size option is set for the session.  -f sets a comma-\nseparated list of client flags (see attach-session).\n\nIf run from a terminal, any termios(4) special characters are saved and used for new\nwindows in the new session.\n\nThe -A flag makes new-session behave like attach-session if session-name already ex‐\nists; in this case, -D behaves like -d to attach-session, and -X behaves like -x to\nattach-session.\n\nIf -t is given, it specifies a session group.  Sessions in the same group share the\nsame set of windows - new windows are linked to all sessions in the group and any win‐\ndows closed removed from all sessions.  The current and previous window and any session\noptions remain independent and any session in a group may be killed without affecting\nthe others.  The group-name argument may be:\n\n1.      the name of an existing group, in which case the new session is added to that\ngroup;\n\n2.      the name of an existing session - the new session is added to the same group as\nthat session, creating a new group if necessary;\n\n3.      the name for a new group containing only the new session.\n\n-n and shell-command are invalid if -t is used.\n\nThe -P option prints information about the new session after it has been created.  By\ndefault, it uses the format ‘#{sessionname}:’ but a different format may be specified\nwith -F.\n\nIf -E is used, the update-environment option will not be applied.  -e takes the form\n‘VARIABLE=value’ and sets an environment variable for the newly created session; it may\nbe specified multiple times.\n\nrefresh-client [-cDlLRSU] [-A pane:state] [-B name:what:format] [-C XxY] [-f flags] [-t\ntarget-client] [adjustment]\n(alias: refresh)\nRefresh the current client if bound to a key, or a single client if one is given with\n-t.  If -S is specified, only update the client's status line.\n\nThe -U, -D, -L -R, and -c flags allow the visible portion of a window which is larger\nthan the client to be changed.  -U moves the visible part up by adjustment rows and -D\ndown, -L left by adjustment columns and -R right.  -c returns to tracking the cursor\nautomatically.  If adjustment is omitted, 1 is used.  Note that the visible position is\na property of the client not of the window, changing the current window in the attached\nsession will reset it.\n\n-C sets the width and height of a control mode client.  -A allows a control mode client\nto trigger actions on a pane.  The argument is a pane ID (with leading ‘%’), a colon,\nthen one of ‘on’, ‘off’, ‘continue’ or ‘pause’.  If ‘off’, tmux will not send output\nfrom the pane to the client and if all clients have turned the pane off, will stop\nreading from the pane.  If ‘continue’, tmux will return to sending output to the pane\nif it was paused (manually or with the pause-after flag).  If ‘pause’, tmux will pause\nthe pane.  -A may be given multiple times for different panes.\n\n-B sets a subscription to a format for a control mode client.  The argument is split\ninto three items by colons: name is a name for the subscription; what is a type of item\nto subscribe to; format is the format.  After a subscription is added, changes to the\nformat are reported with the %subscription-changed notification, at most once a second.\nIf only the name is given, the subscription is removed.  what may be empty to check the\nformat only for the attached session, or one of: a pane ID such as ‘%0’; ‘%*’ for all\npanes in the attached session; a window ID such as ‘@0’; or ‘@*’ for all windows in the\nattached session.\n\n-f sets a comma-separated list of client flags, see attach-session.\n\n-l requests the clipboard from the client using the xterm(1) escape sequence and stores\nit in a new paste buffer.\n\n-L, -R, -U and -D move the visible portion of the window left, right, up or down by\nadjustment, if the window is larger than the client.  -c resets so that the position\nfollows the cursor.  See the window-size option.\n\nrename-session [-t target-session] new-name\n(alias: rename)\nRename the session to new-name.\n\nshow-messages [-JT] [-t target-client]\n(alias: showmsgs)\nShow server messages or information.  Messages are stored, up to a maximum of the limit\nset by the message-limit server option.  -J and -T show debugging information about\njobs and terminals.\n\nsource-file [-Fnqv] path ...\n(alias: source)\nExecute commands from one or more files specified by path (which may be glob(7) pat‐\nterns).  If -F is present, then path is expanded as a format.  If -q is given, no error\nwill be returned if path does not exist.  With -n, the file is parsed but no commands\nare executed.  -v shows the parsed commands and line numbers if possible.\n\n#### start-server\n\n(alias: start)\nStart the tmux server, if not already running, without creating any sessions.\n\nNote that as by default the tmux server will exit with no sessions, this is only useful\nif a session is created in ~/.tmux.conf, exit-empty is turned off, or another command\nis run as part of the same command sequence.  For example:\n\n$ tmux start \\; show -g\n\nsuspend-client [-t target-client]\n(alias: suspendc)\nSuspend a client by sending SIGTSTP (tty stop).\n\nswitch-client [-ElnprZ] [-c target-client] [-t target-session] [-T key-table]\n(alias: switchc)\nSwitch the current session for client target-client to target-session.  As a special\ncase, -t may refer to a pane (a target that contains ‘:’, ‘.’ or ‘%’), to change ses‐\nsion, window and pane.  In that case, -Z keeps the window zoomed if it was zoomed.  If\n-l, -n or -p is used, the client is moved to the last, next or previous session respec‐\ntively.  -r toggles the client read-only and ignore-size flags (see the attach-session\ncommand).\n\nIf -E is used, update-environment option will not be applied.\n\n-T sets the client's key table; the next key from the client will be interpreted from\nkey-table.  This may be used to configure multiple prefix keys, or to bind commands to\nsequences of keys.  For example, to make typing ‘abc’ run the list-keys command:\n\nbind-key -Ttable2 c list-keys\nbind-key -Ttable1 b switch-client -Ttable2\nbind-key -Troot   a switch-client -Ttable1\n\n### WINDOWS AND PANES\n\nEach window displayed by tmux may be split into one or more panes; each pane takes up a certain\narea of the display and is a separate terminal.  A window may be split into panes using the\nsplit-window command.  Windows may be split horizontally (with the -h flag) or vertically.\nPanes may be resized with the resize-pane command (bound to ‘C-Up’, ‘C-Down’ ‘C-Left’ and\n‘C-Right’ by default), the current pane may be changed with the select-pane command and the\nrotate-window and swap-pane commands may be used to swap panes without changing their position.\nPanes are numbered beginning from zero in the order they are created.\n\nBy default, a tmux pane permits direct access to the terminal contained in the pane.  A pane\nmay also be put into one of several modes:\n\n-   Copy mode, which permits a section of a window or its history to be copied to a paste\nbuffer for later insertion into another window.  This mode is entered with the\ncopy-mode command, bound to ‘[’ by default.  Copied text can be pasted with the\npaste-buffer command, bound to ‘]’.\n\n-   View mode, which is like copy mode but is entered when a command that produces out‐\nput, such as list-keys, is executed from a key binding.\n\n-   Choose mode, which allows an item to be chosen from a list.  This may be a client, a\nsession or window or pane, or a buffer.  This mode is entered with the choose-buffer,\nchoose-client and choose-tree commands.\n\nIn copy mode an indicator is displayed in the top-right corner of the pane with the current po‐\nsition and the number of lines in the history.\n\nCommands are sent to copy mode using the -X flag to the send-keys command.  When a key is\npressed, copy mode automatically uses one of two key tables, depending on the mode-keys option:\ncopy-mode for emacs, or copy-mode-vi for vi.  Key tables may be viewed with the list-keys com‐\nmand.\n\nThe following commands are supported in copy mode:\n\nCommand                                      vi              emacs\nappend-selection\nappend-selection-and-cancel                  A\nback-to-indentation                          ^               M-m\nbegin-selection                              Space           C-Space\nbottom-line                                  L\ncancel                                       q               Escape\nclear-selection                              Escape          C-g\ncopy-end-of-line [<prefix>]                  D               C-k\ncopy-line [<prefix>]\ncopy-pipe [<command>] [<prefix>]\ncopy-pipe-no-clear [<command>] [<prefix>]\ncopy-pipe-and-cancel [<command>] [<prefix>]\ncopy-selection [<prefix>]\ncopy-selection-no-clear [<prefix>]\ncopy-selection-and-cancel [<prefix>]         Enter           M-w\ncursor-down                                  j               Down\ncursor-down-and-cancel\ncursor-left                                  h               Left\ncursor-right                                 l               Right\ncursor-up                                    k               Up\nend-of-line                                  $               C-e\ngoto-line <line>                             :               g\nhalfpage-down                                C-d             M-Down\nhalfpage-down-and-cancel\nhalfpage-up                                  C-u             M-Up\nhistory-bottom                               G               M->\nhistory-top                                  g               M-<\njump-again                                   ;               ;\njump-backward <to>                           F               F\njump-forward <to>                            f               f\njump-reverse                                 ,               ,\njump-to-backward <to>                        T\njump-to-forward <to>                         t\njump-to-mark                                 M-x             M-x\nmiddle-line                                  M               M-r\nnext-matching-bracket                        %               M-C-f\nnext-paragraph                               }               M-}\nnext-space                                   W\nnext-space-end                               E\nnext-word                                    w\nnext-word-end                                e               M-f\nother-end                                    o\npage-down                                    C-f             PageDown\npage-down-and-cancel\npage-up                                      C-b             PageUp\npipe [<command>] [<prefix>]\npipe-no-clear [<command>] [<prefix>]\npipe-and-cancel [<command>] [<prefix>]\nprevious-matching-bracket                                    M-C-b\nprevious-paragraph                           {               M-{\nprevious-space                               B\nprevious-word                                b               M-b\nrectangle-on\nrectangle-off\nrectangle-toggle                             v               R\nrefresh-from-pane                            r               r\nscroll-down                                  C-e             C-Down\nscroll-down-and-cancel\nscroll-up                                    C-y             C-Up\nsearch-again                                 n               n\nsearch-backward <for>                        ?\nsearch-backward-incremental <for>                            C-r\nsearch-backward-text <for>\nsearch-forward <for>                         /\nsearch-forward-incremental <for>                             C-s\nsearch-forward-text <for>\nsearch-reverse                               N               N\nselect-line                                  V\nselect-word\nset-mark                                     X               X\nstart-of-line                                0               C-a\nstop-selection\ntop-line                                     H               M-R\n\nThe search commands come in several varieties: ‘search-forward’ and ‘search-backward’ search\nfor a regular expression; the ‘-text’ variants search for a plain text string rather than a\nregular expression; ‘-incremental’ perform an incremental search and expect to be used with the\n\n#### -i\n\n‘search-reverse’ does the same but reverses the direction (forward becomes backward and back‐\nward becomes forward).\n\nCopy commands may take an optional buffer prefix argument which is used to generate the buffer\nname (the default is ‘buffer’ so buffers are named ‘buffer0’, ‘buffer1’ and so on).  Pipe com‐\nmands take a command argument which is the command to which the selected text is piped.\n‘copy-pipe’ variants also copy the selection.  The ‘-and-cancel’ variants of some commands exit\ncopy mode after they have completed (for copy commands) or when the cursor reaches the bottom\n(for scrolling commands).  ‘-no-clear’ variants do not clear the selection.\n\nThe next and previous word keys use space and the ‘-’, ‘’ and ‘@’ characters as word delim‐\niters by default, but this can be adjusted by setting the word-separators session option.  Next\nword moves to the start of the next word, next word end to the end of the next word and previ‐\nous word to the start of the previous word.  The three next and previous space keys work simi‐\nlarly but use a space alone as the word separator.\n\nThe jump commands enable quick movement within a line.  For instance, typing ‘f’ followed by\n‘/’ will move the cursor to the next ‘/’ character on the current line.  A ‘;’ will then jump\nto the next occurrence.\n\nCommands in copy mode may be prefaced by an optional repeat count.  With vi key bindings, a\nprefix is entered using the number keys; with emacs, the Alt (meta) key and a number begins\nprefix entry.\n\nThe synopsis for the copy-mode command is:\n\ncopy-mode [-eHMqu] [-s src-pane] [-t target-pane]\nEnter copy mode.  The -u option scrolls one page up.  -M begins a mouse drag (only\nvalid if bound to a mouse key binding, see MOUSE SUPPORT).  -H hides the position indi‐\ncator in the top right.  -q cancels copy mode and any other modes.  -s copies from\nsrc-pane instead of target-pane.\n\n-e specifies that scrolling to the bottom of the history (to the visible screen) should\nexit copy mode.  While in copy mode, pressing a key other than those used for scrolling\nwill disable this behaviour.  This is intended to allow fast scrolling through a pane's\nhistory, for example with:\n\nbind PageUp copy-mode -eu\n\nA number of preset arrangements of panes are available, these are called layouts.  These may be\nselected with the select-layout command or cycled with next-layout (bound to ‘Space’ by de‐\nfault); once a layout is chosen, panes within it may be moved and resized as normal.\n\nThe following layouts are supported:\n\n#### even-horizontal\n\nPanes are spread out evenly from left to right across the window.\n\n#### even-vertical\n\nPanes are spread evenly from top to bottom.\n\n#### main-horizontal\n\nA large (main) pane is shown at the top of the window and the remaining panes are\nspread from left to right in the leftover space at the bottom.  Use the\nmain-pane-height window option to specify the height of the top pane.\n\n#### main-vertical\n\nSimilar to main-horizontal but the large pane is placed on the left and the others\nspread from top to bottom along the right.  See the main-pane-width window option.\n\ntiled   Panes are spread out as evenly as possible over the window in both rows and columns.\n\nIn addition, select-layout may be used to apply a previously used layout - the list-windows\ncommand displays the layout of each window in a form suitable for use with select-layout.  For\nexample:\n\n$ tmux list-windows\n0: ksh [159x48]\nlayout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}\n$ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}\n\ntmux automatically adjusts the size of the layout for the current window size.  Note that a\nlayout cannot be applied to a window with more panes than that from which the layout was origi‐\nnally defined.\n\nCommands related to windows and panes are as follows:\n\nbreak-pane [-abdP] [-F format] [-n window-name] [-s src-pane] [-t dst-window]\n(alias: breakp)\nBreak src-pane off from its containing window to make it the only pane in dst-window.\nWith -a or -b, the window is moved to the next index after or before (existing windows\nare moved if necessary).  If -d is given, the new window does not become the current\nwindow.  The -P option prints information about the new window after it has been cre‐\nated.  By default, it uses the format ‘#{sessionname}:#{windowindex}.#{paneindex}’\nbut a different format may be specified with -F.\n\ncapture-pane [-aepPqCJN] [-b buffer-name] [-E end-line] [-S start-line] [-t target-pane]\n(alias: capturep)\nCapture the contents of a pane.  If -p is given, the output goes to stdout, otherwise\nto the buffer specified with -b or a new buffer if omitted.  If -a is given, the alter‐\nnate screen is used, and the history is not accessible.  If no alternate screen exists,\nan error will be returned unless -q is given.  If -e is given, the output includes es‐\ncape sequences for text and background attributes.  -C also escapes non-printable char‐\nacters as octal \\xxx.  -N preserves trailing spaces at each line's end and -J preserves\ntrailing spaces and joins any wrapped lines.  -P captures only any output that the pane\nhas received that is the beginning of an as-yet incomplete escape sequence.\n\n-S and -E specify the starting and ending line numbers, zero is the first line of the\nvisible pane and negative numbers are lines in the history.  ‘-’ to -S is the start of\nthe history and to -E the end of the visible pane.  The default is to capture only the\nvisible contents of the pane.\n\nchoose-client [-NrZ] [-F format] [-f filter] [-K key-format] [-O sort-order] [-t target-pane]\n[template]\nPut a pane into client mode, allowing a client to be selected interactively from a\nlist.  Each client is shown on one line.  A shortcut key is shown on the left in brack‐\nets allowing for immediate choice, or the list may be navigated and an item chosen or\notherwise manipulated using the keys below.  -Z zooms the pane.  The following keys may\nbe used in client mode:\n\nKey    Function\nEnter  Choose selected client\nUp     Select previous client\nDown   Select next client\nC-s    Search by name\nn      Repeat last search\nt      Toggle if client is tagged\nT      Tag no clients\nC-t    Tag all clients\nd      Detach selected client\nD      Detach tagged clients\nx      Detach and HUP selected client\nX      Detach and HUP tagged clients\nz      Suspend selected client\nZ      Suspend tagged clients\nf      Enter a format to filter items\nO      Change sort field\nr      Reverse sort order\nv      Toggle preview\nq      Exit mode\n\nAfter a client is chosen, ‘%%’ is replaced by the client name in template and the re‐\nsult executed as a command.  If template is not given, \"detach-client -t '%%'\" is used.\n\n-O specifies the initial sort field: one of ‘name’, ‘size’, ‘creation’, or ‘activity’.\n-r reverses the sort order.  -f specifies an initial filter: the filter is a format -\nif it evaluates to zero, the item in the list is not shown, otherwise it is shown.  If\na filter would lead to an empty list, it is ignored.  -F specifies the format for each\nitem in the list and -K a format for each shortcut key; both are evaluated once for\neach line.  -N starts without the preview.  This command works only if at least one\nclient is attached.\n\nchoose-tree [-GNrswZ] [-F format] [-f filter] [-K key-format] [-O sort-order] [-t target-pane]\n[template]\nPut a pane into tree mode, where a session, window or pane may be chosen interactively\nfrom a tree.  Each session, window or pane is shown on one line.  A shortcut key is\nshown on the left in brackets allowing for immediate choice, or the tree may be navi‐\ngated and an item chosen or otherwise manipulated using the keys below.  -s starts with\nsessions collapsed and -w with windows collapsed.  -Z zooms the pane.  The following\nkeys may be used in tree mode:\n\nKey    Function\nEnter  Choose selected item\nUp     Select previous item\nDown   Select next item\n+      Expand selected item\n-      Collapse selected item\nM-+    Expand all items\nM--    Collapse all items\nx      Kill selected item\nX      Kill tagged items\n<      Scroll list of previews left\n>      Scroll list of previews right\nC-s    Search by name\nm      Set the marked pane\nM      Clear the marked pane\nn      Repeat last search\nt      Toggle if item is tagged\nT      Tag no items\nC-t    Tag all items\n:      Run a command for each tagged item\nf      Enter a format to filter items\nH      Jump to the starting pane\nO      Change sort field\nr      Reverse sort order\nv      Toggle preview\nq      Exit mode\n\nAfter a session, window or pane is chosen, ‘%%’ is replaced by the target in template\nand the result executed as a command.  If template is not given, \"switch-client -t\n'%%'\" is used.\n\n-O specifies the initial sort field: one of ‘index’, ‘name’, or ‘time’.  -r reverses\nthe sort order.  -f specifies an initial filter: the filter is a format - if it evalu‐\nates to zero, the item in the list is not shown, otherwise it is shown.  If a filter\nwould lead to an empty list, it is ignored.  -F specifies the format for each item in\nthe tree and -K a format for each shortcut key; both are evaluated once for each line.\n-N starts without the preview.  -G includes all sessions in any session groups in the\ntree rather than only the first.  This command works only if at least one client is at‐\ntached.\n\ncustomize-mode [-NZ] [-F format] [-f filter] [-t target-pane] [template]\nPut a pane into customize mode, where options and key bindings may be browsed and modi‐\nfied from a list.  Option values in the list are shown for the active pane in the cur‐\nrent window.  -Z zooms the pane.  The following keys may be used in customize mode:\n\nKey    Function\nEnter  Set pane, window, session or global option value\nUp     Select previous item\nDown   Select next item\n+      Expand selected item\n-      Collapse selected item\nM-+    Expand all items\nM--    Collapse all items\ns      Set option value or key attribute\nS      Set global option value\nw      Set window option value, if option is for pane and window\nd      Set an option or key to the default\nD      Set tagged options and tagged keys to the default\nu      Unset an option (set to default value if global) or unbind a key\nU      Unset tagged options and unbind tagged keys\nC-s    Search by name\nn      Repeat last search\nt      Toggle if item is tagged\nT      Tag no items\nC-t    Tag all items\nf      Enter a format to filter items\nv      Toggle option information\nq      Exit mode\n\n-f specifies an initial filter: the filter is a format - if it evaluates to zero, the\nitem in the list is not shown, otherwise it is shown.  If a filter would lead to an\nempty list, it is ignored.  -F specifies the format for each item in the tree.  -N\nstarts without the option information.  This command works only if at least one client\nis attached.\n\ndisplay-panes [-bN] [-d duration] [-t target-client] [template]\n(alias: displayp)\nDisplay a visible indicator of each pane shown by target-client.  See the\ndisplay-panes-colour and display-panes-active-colour session options.  The indicator is\nclosed when a key is pressed (unless -N is given) or duration milliseconds have passed.\nIf -d is not given, display-panes-time is used.  A duration of zero means the indicator\nstays until a key is pressed.  While the indicator is on screen, a pane may be chosen\nwith the ‘0’ to ‘9’ keys, which will cause template to be executed as a command with\n‘%%’ substituted by the pane ID.  The default template is \"select-pane -t '%%'\".  With\n-b, other commands are not blocked from running until the indicator is closed.\n\nfind-window [-iCNrTZ] [-t target-pane] match-string\n(alias: findw)\nSearch for a fnmatch(3) pattern or, with -r, regular expression match-string in window\nnames, titles, and visible content (but not history).  The flags control matching be‐\nhavior: -C matches only visible window contents, -N matches only the window name and -T\nmatches only the window title.  -i makes the search ignore case.  The default is -CNT.\n-Z zooms the pane.\n\nThis command works only if at least one client is attached.\n\njoin-pane [-bdfhv] [-l size] [-s src-pane] [-t dst-pane]\n(alias: joinp)\nLike split-window, but instead of splitting dst-pane and creating a new pane, split it\nand move src-pane into the space.  This can be used to reverse break-pane.  The -b op‐\ntion causes src-pane to be joined to left of or above dst-pane.\n\nIf -s is omitted and a marked pane is present (see select-pane -m), the marked pane is\nused rather than the current pane.\n\nkill-pane [-a] [-t target-pane]\n(alias: killp)\nDestroy the given pane.  If no panes remain in the containing window, it is also de‐\nstroyed.  The -a option kills all but the pane given with -t.\n\nkill-window [-a] [-t target-window]\n(alias: killw)\nKill the current window or the window at target-window, removing it from any sessions\nto which it is linked.  The -a option kills all but the window given with -t.\n\nlast-pane [-deZ] [-t target-window]\n(alias: lastp)\nSelect the last (previously selected) pane.  -Z keeps the window zoomed if it was\nzoomed.  -e enables or -d disables input to the pane.\n\nlast-window [-t target-session]\n(alias: last)\nSelect the last (previously selected) window.  If no target-session is specified, se‐\nlect the last window of the current session.\n\nlink-window [-abdk] [-s src-window] [-t dst-window]\n(alias: linkw)\nLink the window at src-window to the specified dst-window.  If dst-window is specified\nand no such window exists, the src-window is linked there.  With -a or -b the window is\nmoved to the next index after or before dst-window (existing windows are moved if nec‐\nessary).  If -k is given and dst-window exists, it is killed, otherwise an error is\ngenerated.  If -d is given, the newly linked window is not selected.\n\nlist-panes [-as] [-F format] [-f filter] [-t target]\n(alias: lsp)\nIf -a is given, target is ignored and all panes on the server are listed.  If -s is\ngiven, target is a session (or the current session).  If neither is given, target is a\nwindow (or the current window).  -F specifies the format of each line and -f a filter.\nOnly panes for which the filter is true are shown.  See the FORMATS section.\n\nlist-windows [-a] [-F format] [-f filter] [-t target-session]\n(alias: lsw)\nIf -a is given, list all windows on the server.  Otherwise, list windows in the current\nsession or in target-session.  -F specifies the format of each line and -f a filter.\nOnly windows for which the filter is true are shown.  See the FORMATS section.\n\nmove-pane [-bdfhv] [-l size] [-s src-pane] [-t dst-pane]\n(alias: movep)\nDoes the same as join-pane.\n\nmove-window [-abrdk] [-s src-window] [-t dst-window]\n(alias: movew)\nThis is similar to link-window, except the window at src-window is moved to dst-window.\nWith -r, all windows in the session are renumbered in sequential order, respecting the\nbase-index option.\n\nnew-window [-abdkPS] [-c start-directory] [-e environment] [-F format] [-n window-name] [-t\ntarget-window] [shell-command]\n(alias: neww)\nCreate a new window.  With -a or -b, the new window is inserted at the next index after\nor before the specified target-window, moving windows up if necessary; otherwise\ntarget-window is the new window location.\n\nIf -d is given, the session does not make the new window the current window.\ntarget-window represents the window to be created; if the target already exists an er‐\nror is shown, unless the -k flag is used, in which case it is destroyed.  If -S is\ngiven and a window named window-name already exists, it is selected (unless -d is also\ngiven in which case the command does nothing).\n\nshell-command is the command to execute.  If shell-command is not specified, the value\nof the default-command option is used.  -c specifies the working directory in which the\nnew window is created.\n\nWhen the shell command completes, the window closes.  See the remain-on-exit option to\nchange this behaviour.\n\n-e takes the form ‘VARIABLE=value’ and sets an environment variable for the newly cre‐\nated window; it may be specified multiple times.\n\nThe TERM environment variable must be set to ‘screen’ or ‘tmux’ for all programs run‐\nning inside tmux.  New windows will automatically have ‘TERM=screen’ added to their en‐\nvironment, but care must be taken not to reset this in shell start-up files or by the\n-e option.\n\nThe -P option prints information about the new window after it has been created.  By\ndefault, it uses the format ‘#{sessionname}:#{windowindex}’ but a different format\nmay be specified with -F.\n\nnext-layout [-t target-window]\n(alias: nextl)\nMove a window to the next layout and rearrange the panes to fit.\n\nnext-window [-a] [-t target-session]\n(alias: next)\nMove to the next window in the session.  If -a is used, move to the next window with an\nalert.\n\npipe-pane [-IOo] [-t target-pane] [shell-command]\n(alias: pipep)\nPipe output sent by the program in target-pane to a shell command or vice versa.  A\npane may only be connected to one command at a time, any existing pipe is closed before\nshell-command is executed.  The shell-command string may contain the special character\nsequences supported by the status-left option.  If no shell-command is given, the cur‐\nrent pipe (if any) is closed.\n\n-I and -O specify which of the shell-command output streams are connected to the pane:\nwith -I stdout is connected (so anything shell-command prints is written to the pane as\nif it were typed); with -O stdin is connected (so any output in the pane is piped to\nshell-command).  Both may be used together and if neither are specified, -O is used.\n\nThe -o option only opens a new pipe if no previous pipe exists, allowing a pipe to be\ntoggled with a single key, for example:\n\nbind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'\n\nprevious-layout [-t target-window]\n(alias: prevl)\nMove to the previous layout in the session.\n\nprevious-window [-a] [-t target-session]\n(alias: prev)\nMove to the previous window in the session.  With -a, move to the previous window with\nan alert.\n\nrename-window [-t target-window] new-name\n(alias: renamew)\nRename the current window, or the window at target-window if specified, to new-name.\n\nresize-pane [-DLMRTUZ] [-t target-pane] [-x width] [-y height] [adjustment]\n(alias: resizep)\nResize a pane, up, down, left or right by adjustment with -U, -D, -L or -R, or to an\nabsolute size with -x or -y.  The adjustment is given in lines or columns (the default\nis 1); -x and -y may be a given as a number of lines or columns or followed by ‘%’ for\na percentage of the window size (for example ‘-x 10%’).  With -Z, the active pane is\ntoggled between zoomed (occupying the whole of the window) and unzoomed (its normal po‐\nsition in the layout).\n\n-M begins mouse resizing (only valid if bound to a mouse key binding, see MOUSE\nSUPPORT).\n\n-T trims all lines below the current cursor position and moves lines out of the history\nto replace them.\n\nresize-window [-aADLRU] [-t target-window] [-x width] [-y height] [adjustment]\n(alias: resizew)\nResize a window, up, down, left or right by adjustment with -U, -D, -L or -R, or to an\nabsolute size with -x or -y.  The adjustment is given in lines or cells (the default is\n1).  -A sets the size of the largest session containing the window; -a the size of the\nsmallest.  This command will automatically set window-size to manual in the window op‐\ntions.\n\nrespawn-pane [-k] [-c start-directory] [-e environment] [-t target-pane] [shell-command]\n(alias: respawnp)\nReactivate a pane in which the command has exited (see the remain-on-exit window op‐\ntion).  If shell-command is not given, the command used when the pane was created or\nlast respawned is executed.  The pane must be already inactive, unless -k is given, in\nwhich case any existing command is killed.  -c specifies a new working directory for\nthe pane.  The -e option has the same meaning as for the new-window command.\n\nrespawn-window [-k] [-c start-directory] [-e environment] [-t target-window] [shell-command]\n(alias: respawnw)\nReactivate a window in which the command has exited (see the remain-on-exit window op‐\ntion).  If shell-command is not given, the command used when the window was created or\nlast respawned is executed.  The window must be already inactive, unless -k is given,\nin which case any existing command is killed.  -c specifies a new working directory for\nthe window.  The -e option has the same meaning as for the new-window command.\n\nrotate-window [-DUZ] [-t target-window]\n(alias: rotatew)\nRotate the positions of the panes within a window, either upward (numerically lower)\nwith -U or downward (numerically higher).  -Z keeps the window zoomed if it was zoomed.\n\nselect-layout [-Enop] [-t target-pane] [layout-name]\n(alias: selectl)\nChoose a specific layout for a window.  If layout-name is not given, the last preset\nlayout used (if any) is reapplied.  -n and -p are equivalent to the next-layout and\nprevious-layout commands.  -o applies the last set layout if possible (undoes the most\nrecent layout change).  -E spreads the current pane and any panes next to it out\nevenly.\n\nselect-pane [-DdeLlMmRUZ] [-T title] [-t target-pane]\n(alias: selectp)\nMake pane target-pane the active pane in its window.  If one of -D, -L, -R, or -U is\nused, respectively the pane below, to the left, to the right, or above the target pane\nis used.  -Z keeps the window zoomed if it was zoomed.  -l is the same as using the\nlast-pane command.  -e enables or -d disables input to the pane.  -T sets the pane ti‐\ntle.\n\n-m and -M are used to set and clear the marked pane.  There is one marked pane at a\ntime, setting a new marked pane clears the last.  The marked pane is the default target\nfor -s to join-pane, move-pane, swap-pane and swap-window.\n\nselect-window [-lnpT] [-t target-window]\n(alias: selectw)\nSelect the window at target-window.  -l, -n and -p are equivalent to the last-window,\nnext-window and previous-window commands.  If -T is given and the selected window is\nalready the current window, the command behaves like last-window.\n\nsplit-window [-bdfhIvPZ] [-c start-directory] [-e environment] [-l size] [-t target-pane]\n[shell-command] [-F format]\n(alias: splitw)\nCreate a new pane by splitting target-pane: -h does a horizontal split and -v a verti‐\ncal split; if neither is specified, -v is assumed.  The -l option specifies the size of\nthe new pane in lines (for vertical split) or in columns (for horizontal split); size\nmay be followed by ‘%’ to specify a percentage of the available space.  The -b option\ncauses the new pane to be created to the left of or above target-pane.  The -f option\ncreates a new pane spanning the full window height (with -h) or full window width (with\n-v), instead of splitting the active pane.  -Z zooms if the window is not zoomed, or\nkeeps it zoomed if already zoomed.\n\nAn empty shell-command ('') will create a pane with no command running in it.  Output\ncan be sent to such a pane with the display-message command.  The -I flag (if\nshell-command is not specified or empty) will create an empty pane and forward any out‐\nput from stdin to it.  For example:\n\n$ make 2>&1|tmux splitw -dI &\n\nAll other options have the same meaning as for the new-window command.\n\nswap-pane [-dDUZ] [-s src-pane] [-t dst-pane]\n(alias: swapp)\nSwap two panes.  If -U is used and no source pane is specified with -s, dst-pane is\nswapped with the previous pane (before it numerically); -D swaps with the next pane\n(after it numerically).  -d instructs tmux not to change the active pane and -Z keeps\nthe window zoomed if it was zoomed.\n\nIf -s is omitted and a marked pane is present (see select-pane -m), the marked pane is\nused rather than the current pane.\n\nswap-window [-d] [-s src-window] [-t dst-window]\n(alias: swapw)\nThis is similar to link-window, except the source and destination windows are swapped.\nIt is an error if no window exists at src-window.  If -d is given, the new window does\nnot become the current window.\n\nIf -s is omitted and a marked pane is present (see select-pane -m), the window contain‐\ning the marked pane is used rather than the current window.\n\nunlink-window [-k] [-t target-window]\n(alias: unlinkw)\nUnlink target-window.  Unless -k is given, a window may be unlinked only if it is\nlinked to multiple sessions - windows may not be linked to no sessions; if -k is speci‐\nfied and the window is linked to only one session, it is unlinked and destroyed.\n\n### KEY BINDINGS\n\ntmux allows a command to be bound to most keys, with or without a prefix key.  When specifying\nkeys, most represent themselves (for example ‘A’ to ‘Z’).  Ctrl keys may be prefixed with ‘C-’\nor ‘^’, Shift keys with ‘S-’ and Alt (meta) with ‘M-’.  In addition, the following special key\nnames are accepted: Up, Down, Left, Right, BSpace, BTab, DC (Delete), End, Enter, Escape, F1 to\nF12, Home, IC (Insert), NPage/PageDown/PgDn, PPage/PageUp/PgUp, Space, and Tab.  Note that to\nbind the ‘\"’ or ‘'’ keys, quotation marks are necessary, for example:\n\nbind-key '\"' split-window\nbind-key \"'\" new-window\n\nA command bound to the Any key will execute for all keys which do not have a more specific\nbinding.\n\nCommands related to key bindings are as follows:\n\nbind-key [-nr] [-N note] [-T key-table] key command [arguments]\n(alias: bind)\nBind key key to command.  Keys are bound in a key table.  By default (without -T), the\nkey is bound in the prefix key table.  This table is used for keys pressed after the\nprefix key (for example, by default ‘c’ is bound to new-window in the prefix table, so\n‘C-b c’ creates a new window).  The root table is used for keys pressed without the\nprefix key: binding ‘c’ to new-window in the root table (not recommended) means a plain\n‘c’ will create a new window.  -n is an alias for -T root.  Keys may also be bound in\ncustom key tables and the switch-client -T command used to switch to them from a key\nbinding.  The -r flag indicates this key may repeat, see the repeat-time option.  -N\nattaches a note to the key (shown with list-keys -N).\n\nTo view the default bindings and possible commands, see the list-keys command.\n\nlist-keys [-1aN] [-P prefix-string -T key-table] [key]\n(alias: lsk)\nList key bindings.  There are two forms: the default lists keys as bind-key commands;\n-N lists only keys with attached notes and shows only the key and note for each key.\n\nWith the default form, all key tables are listed by default.  -T lists only keys in\nkey-table.\n\nWith the -N form, only keys in the root and prefix key tables are listed by default; -T\nalso lists only keys in key-table.  -P specifies a prefix to print before each key and\n-1 lists only the first matching key.  -a lists the command for keys that do not have a\nnote rather than skipping them.\n\nsend-keys [-FHlMRX] [-N repeat-count] [-t target-pane] key ...\n(alias: send)\nSend a key or keys to a window.  Each argument key is the name of the key (such as\n‘C-a’ or ‘NPage’) to send; if the string is not recognised as a key, it is sent as a\nseries of characters.  All arguments are sent sequentially from first to last.\n\nThe -l flag disables key name lookup and processes the keys as literal UTF-8 charac‐\nters.  The -H flag expects each key to be a hexadecimal number for an ASCII character.\n\nThe -R flag causes the terminal state to be reset.\n\n-M passes through a mouse event (only valid if bound to a mouse key binding, see MOUSE\nSUPPORT).\n\n-X is used to send a command into copy mode - see the WINDOWS AND PANES section.  -N\nspecifies a repeat count and -F expands formats in arguments where appropriate.\n\nsend-prefix [-2] [-t target-pane]\nSend the prefix key, or with -2 the secondary prefix key, to a window as if it was\npressed.\n\nunbind-key [-anq] [-T key-table] key\n(alias: unbind)\nUnbind the command bound to key.  -n and -T are the same as for bind-key.  If -a is\npresent, all key bindings are removed.  The -q option prevents errors being returned.\n\n### OPTIONS\n\nThe appearance and behaviour of tmux may be modified by changing the value of various options.\nThere are four types of option: server options, session options, window options, and pane\noptions.\n\nThe tmux server has a set of global server options which do not apply to any particular window\nor session or pane.  These are altered with the set-option -s command, or displayed with the\nshow-options -s command.\n\nIn addition, each individual session may have a set of session options, and there is a separate\nset of global session options.  Sessions which do not have a particular option configured in‐\nherit the value from the global session options.  Session options are set or unset with the\nset-option command and may be listed with the show-options command.  The available server and\nsession options are listed under the set-option command.\n\nSimilarly, a set of window options is attached to each window and a set of pane options to each\npane.  Pane options inherit from window options.  This means any pane option may be set as a\nwindow option to apply the option to all panes in the window without the option set, for exam‐\nple these commands will set the background colour to red for all panes except pane 0:\n\nset -w window-style bg=red\nset -pt:.0 window-style bg=blue\n\nThere is also a set of global window options from which any unset window or pane options are\ninherited.  Window and pane options are altered with set-option -w and -p commands and dis‐\nplayed with show-option -w and -p.\n\ntmux also supports user options which are prefixed with a ‘@’.  User options may have any name,\nso long as they are prefixed with ‘@’, and be set to any string.  For example:\n\n$ tmux set -wq @foo \"abc123\"\n$ tmux show -wv @foo\nabc123\n\nCommands which set options are as follows:\n\nset-option [-aFgopqsuUw] [-t target-pane] option value\n(alias: set)\nSet a pane option with -p, a window option with -w, a server option with -s, otherwise\na session option.  If the option is not a user option, -w or -s may be unnecessary -\ntmux will infer the type from the option name, assuming -w for pane options.  If -g is\ngiven, the global session or window option is set.\n\n-F expands formats in the option value.  The -u flag unsets an option, so a session in‐\nherits the option from the global options (or with -g, restores a global option to the\ndefault).  -U unsets an option (like -u) but if the option is a pane option also unsets\nthe option on any panes in the window.  value depends on the option and may be a num‐\nber, a string, or a flag (on, off, or omitted to toggle).\n\nThe -o flag prevents setting an option that is already set and the -q flag suppresses\nerrors about unknown or ambiguous options.\n\nWith -a, and if the option expects a string or a style, value is appended to the exist‐\ning setting.  For example:\n\nset -g status-left \"foo\"\nset -ag status-left \"bar\"\n\nWill result in ‘foobar’.  And:\n\nset -g status-style \"bg=red\"\nset -ag status-style \"fg=blue\"\n\nWill result in a red background and blue foreground.  Without -a, the result would be\nthe default background and a blue foreground.\n\nshow-options [-AgHpqsvw] [-t target-pane] [option]\n(alias: show)\nShow the pane options (or a single option if option is provided) with -p, the window\noptions with -w, the server options with -s, otherwise the session options.  If the op‐\ntion is not a user option, -w or -s may be unnecessary - tmux will infer the type from\nthe option name, assuming -w for pane options.  Global session or window options are\nlisted if -g is used.  -v shows only the option value, not the name.  If -q is set, no\nerror will be returned if option is unset.  -H includes hooks (omitted by default).  -A\nincludes options inherited from a parent set of options, such options are marked with\nan asterisk.\n\nAvailable server options are:\n\nbackspace key\nSet the key sent by tmux for backspace.\n\nbuffer-limit number\nSet the number of buffers; as new buffers are added to the top of the stack, old ones\nare removed from the bottom if necessary to maintain this maximum length.\n\ncommand-alias[] name=value\nThis is an array of custom aliases for commands.  If an unknown command matches name,\nit is replaced with value.  For example, after:\n\nset -s command-alias[100] zoom='resize-pane -Z'\n\nUsing:\n\nzoom -t:.1\n\nIs equivalent to:\n\nresize-pane -Z -t:.1\n\nNote that aliases are expanded when a command is parsed rather than when it is exe‐\ncuted, so binding an alias with bind-key will bind the expanded form.\n\ndefault-terminal terminal\nSet the default terminal for new windows created in this session - the default value of\nthe TERM environment variable.  For tmux to work correctly, this must be set to\n‘screen’, ‘tmux’ or a derivative of them.\n\ncopy-command shell-command\nGive the command to pipe to if the copy-pipe copy mode command is used without argu‐\nments.\n\nescape-time time\nSet the time in milliseconds for which tmux waits after an escape is input to determine\nif it is part of a function or meta key sequences.  The default is 500 milliseconds.\n\neditor shell-command\nSet the command used when tmux runs an editor.\n\nexit-empty [on | off]\nIf enabled (the default), the server will exit when there are no active sessions.\n\nexit-unattached [on | off]\nIf enabled, the server will exit when there are no attached clients.\n\nextended-keys [on | off | always]\nWhen on or always, the escape sequence to enable extended keys is sent to the terminal,\nif tmux knows that it is supported.  tmux always recognises extended keys itself.  If\nthis option is on, tmux will only forward extended keys to applications when they re‐\nquest them; if always, tmux will always forward the keys.\n\nfocus-events [on | off]\nWhen enabled, focus events are requested from the terminal if supported and passed\nthrough to applications running in tmux.  Attached clients should be detached and at‐\ntached again after changing this option.\n\nhistory-file path\nIf not empty, a file to which tmux will write command prompt history on exit and load\nit from on start.\n\nmessage-limit number\nSet the number of error or information messages to save in the message log for each\nclient.  The default is 100.\n\nset-clipboard [on | external | off]\nAttempt to set the terminal clipboard content using the xterm(1) escape sequence, if\nthere is an Ms entry in the terminfo(5) description (see the TERMINFO EXTENSIONS sec‐\ntion).\n\nIf set to on, tmux will both accept the escape sequence to create a buffer and attempt\nto set the terminal clipboard.  If set to external, tmux will attempt to set the termi‐\nnal clipboard but ignore attempts by applications to set tmux buffers.  If off, tmux\nwill neither accept the clipboard escape sequence nor attempt to set the clipboard.\n\nNote that this feature needs to be enabled in xterm(1) by setting the resource:\n\ndisallowedWindowOps: 20,21,SetXprop\n\nOr changing this property from the xterm(1) interactive menu when required.\n\nterminal-features[] string\nSet terminal features for terminal types read from terminfo(5).  tmux has a set of\nnamed terminal features.  Each will apply appropriate changes to the terminfo(5) entry\nin use.\n\ntmux can detect features for a few common terminals; this option can be used to easily\ntell tmux about features supported by terminals it cannot detect.  The\nterminal-overrides option allows individual terminfo(5) capabilities to be set instead,\nterminal-features is intended for classes of functionality supported in a standard way\nbut not reported by terminfo(5).  Care must be taken to configure this only with fea‐\ntures the terminal actually supports.\n\nThis is an array option where each entry is a colon-separated string made up of a ter‐\nminal type pattern (matched using fnmatch(3)) followed by a list of terminal features.\nThe available features are:\n\n256     Supports 256 colours with the SGR escape sequences.\n\nclipboard\nAllows setting the system clipboard.\n\nccolour\nAllows setting the cursor colour.\n\ncstyle  Allows setting the cursor style.\n\nextkeys\nSupports extended keys.\n\nfocus   Supports focus reporting.\n\nmargins\nSupports DECSLRM margins.\n\nmouse   Supports xterm(1) mouse sequences.\n\noverline\nSupports the overline SGR attribute.\n\nrectfill\nSupports the DECFRA rectangle fill escape sequence.\n\nRGB     Supports RGB colour with the SGR escape sequences.\n\nstrikethrough\nSupports the strikethrough SGR escape sequence.\n\nsync    Supports synchronized updates.\n\ntitle   Supports xterm(1) title setting.\n\nusstyle\nAllows underscore style and colour to be set.\n\nterminal-overrides[] string\nAllow terminal descriptions read using terminfo(5) to be overridden.  Each entry is a\ncolon-separated string made up of a terminal type pattern (matched using fnmatch(3))\nand a set of name=value entries.\n\nFor example, to set the ‘clear’ terminfo(5) entry to ‘\\e[H\\e[2J’ for all terminal types\nmatching ‘rxvt*’:\n\nrxvt*:clear=\\e[H\\e[2J\n\nThe terminal entry value is passed through strunvis(3) before interpretation.\n\nuser-keys[] key\nSet list of user-defined key escape sequences.  Each item is associated with a key\nnamed ‘User0’, ‘User1’, and so on.\n\nFor example:\n\nset -s user-keys[0] \"\\e[5;30012~\"\nbind User0 resize-pane -L 3\n\nAvailable session options are:\n\nactivity-action [any | none | current | other]\nSet action on window activity when monitor-activity is on.  any means activity in any\nwindow linked to a session causes a bell or message (depending on visual-activity) in\nthe current window of that session, none means all activity is ignored (equivalent to\nmonitor-activity being off), current means only activity in windows other than the cur‐\nrent window are ignored and other means activity in the current window is ignored but\nnot those in other windows.\n\nassume-paste-time milliseconds\nIf keys are entered faster than one in milliseconds, they are assumed to have been\npasted rather than typed and tmux key bindings are not processed.  The default is one\nmillisecond and zero disables.\n\nbase-index index\nSet the base index from which an unused index should be searched when a new window is\ncreated.  The default is zero.\n\nbell-action [any | none | current | other]\nSet action on a bell in a window when monitor-bell is on.  The values are the same as\nthose for activity-action.\n\ndefault-command shell-command\nSet the command used for new windows (if not specified when the window is created) to\nshell-command, which may be any sh(1) command.  The default is an empty string, which\ninstructs tmux to create a login shell using the value of the default-shell option.\n\ndefault-shell path\nSpecify the default shell.  This is used as the login shell for new windows when the\ndefault-command option is set to empty, and must be the full path of the executable.\nWhen started tmux tries to set a default value from the first suitable of the SHELL en‐\nvironment variable, the shell returned by getpwuid(3), or /bin/sh.  This option should\nbe configured when tmux is used as a login shell.\n\ndefault-size XxY\nSet the default size of new windows when the window-size option is set to manual or\nwhen a session is created with new-session -d.  The value is the width and height sepa‐\nrated by an ‘x’ character.  The default is 80x24.\n\ndestroy-unattached [on | off]\nIf enabled and the session is no longer attached to any clients, it is destroyed.\n\ndetach-on-destroy [off | on | no-detached]\nIf on (the default), the client is detached when the session it is attached to is de‐\nstroyed.  If off, the client is switched to the most recently active of the remaining\nsessions.  If no-detached, the client is detached only if there are no detached ses‐\nsions; if detached sessions exist, the client is switched to the most recently active.\n\ndisplay-panes-active-colour colour\nSet the colour used by the display-panes command to show the indicator for the active\npane.\n\ndisplay-panes-colour colour\nSet the colour used by the display-panes command to show the indicators for inactive\npanes.\n\ndisplay-panes-time time\nSet the time in milliseconds for which the indicators shown by the display-panes com‐\nmand appear.\n\ndisplay-time time\nSet the amount of time for which status line messages and other on-screen indicators\nare displayed.  If set to 0, messages and indicators are displayed until a key is\npressed.  time is in milliseconds.\n\nhistory-limit lines\nSet the maximum number of lines held in window history.  This setting applies only to\nnew windows - existing window histories are not resized and retain the limit at the\npoint they were created.\n\nkey-table key-table\nSet the default key table to key-table instead of root.\n\nlock-after-time number\nLock the session (like the lock-session command) after number seconds of inactivity.\nThe default is not to lock (set to 0).\n\nlock-command shell-command\nCommand to run when locking each client.  The default is to run lock(1) with -np.\n\nmessage-command-style style\nSet status line message command style.  This is used for the command prompt with vi(1)\nkeys when in command mode.  For how to specify style, see the STYLES section.\n\nmessage-style style\nSet status line message style.  This is used for messages and for the command prompt.\nFor how to specify style, see the STYLES section.\n\nmouse [on | off]\nIf on, tmux captures the mouse and allows mouse events to be bound as key bindings.\nSee the MOUSE SUPPORT section for details.\n\nprefix key\nSet the key accepted as a prefix key.  In addition to the standard keys described under\nKEY BINDINGS, prefix can be set to the special key ‘None’ to set no prefix.\n\nprefix2 key\nSet a secondary key accepted as a prefix key.  Like prefix, prefix2 can be set to\n‘None’.\n\nrenumber-windows [on | off]\nIf on, when a window is closed in a session, automatically renumber the other windows\nin numerical order.  This respects the base-index option if it has been set.  If off,\ndo not renumber the windows.\n\nrepeat-time time\nAllow multiple commands to be entered without pressing the prefix-key again in the\nspecified time milliseconds (the default is 500).  Whether a key repeats may be set\nwhen it is bound using the -r flag to bind-key.  Repeat is enabled for the default keys\nbound to the resize-pane command.\n\nset-titles [on | off]\nAttempt to set the client terminal title using the tsl and fsl terminfo(5) entries if\nthey exist.  tmux automatically sets these to the \\e]0;...\\007 sequence if the terminal\nappears to be xterm(1).  This option is off by default.\n\nset-titles-string string\nString used to set the client terminal title if set-titles is on.  Formats are ex‐\npanded, see the FORMATS section.\n\nsilence-action [any | none | current | other]\nSet action on window silence when monitor-silence is on.  The values are the same as\nthose for activity-action.\n\nstatus [off | on | 2 | 3 | 4 | 5]\nShow or hide the status line or specify its size.  Using on gives a status line one row\nin height; 2, 3, 4 or 5 more rows.\n\nstatus-format[] format\nSpecify the format to be used for each line of the status line.  The default builds the\ntop status line from the various individual status options below.\n\nstatus-interval interval\nUpdate the status line every interval seconds.  By default, updates will occur every 15\nseconds.  A setting of zero disables redrawing at interval.\n\nstatus-justify [left | centre | right | absolute-centre]\nSet the position of the window list in the status line: left, centre or right.  centre\nputs the window list in the relative centre of the available free space; absolute-cen‐\ntre uses the centre of the entire horizontal space.\n\nstatus-keys [vi | emacs]\nUse vi or emacs-style key bindings in the status line, for example at the command\nprompt.  The default is emacs, unless the VISUAL or EDITOR environment variables are\nset and contain the string ‘vi’.\n\nstatus-left string\nDisplay string (by default the session name) to the left of the status line.  string\nwill be passed through strftime(3).  Also see the FORMATS and STYLES sections.\n\nFor details on how the names and titles can be set see the NAMES AND TITLES section.\n\nExamples are:\n\n#(sysctl vm.loadavg)\n#[fg=yellow,bold]#(apm -l)%%#[default] [#S]\n\nThe default is ‘[#S] ’.\n\nstatus-left-length length\nSet the maximum length of the left component of the status line.  The default is 10.\n\nstatus-left-style style\nSet the style of the left part of the status line.  For how to specify style, see the\nSTYLES section.\n\nstatus-position [top | bottom]\nSet the position of the status line.\n\nstatus-right string\nDisplay string to the right of the status line.  By default, the current pane title in\ndouble quotes, the date and the time are shown.  As with status-left, string will be\npassed to strftime(3) and character pairs are replaced.\n\nstatus-right-length length\nSet the maximum length of the right component of the status line.  The default is 40.\n\nstatus-right-style style\nSet the style of the right part of the status line.  For how to specify style, see the\nSTYLES section.\n\nstatus-style style\nSet status line style.  For how to specify style, see the STYLES section.\n\nupdate-environment[] variable\nSet list of environment variables to be copied into the session environment when a new\nsession is created or an existing session is attached.  Any variables that do not exist\nin the source environment are set to be removed from the session environment (as if -r\nwas given to the set-environment command).\n\nvisual-activity [on | off | both]\nIf on, display a message instead of sending a bell when activity occurs in a window for\nwhich the monitor-activity window option is enabled.  If set to both, a bell and a mes‐\nsage are produced.\n\nvisual-bell [on | off | both]\nIf on, a message is shown on a bell in a window for which the monitor-bell window op‐\ntion is enabled instead of it being passed through to the terminal (which normally\nmakes a sound).  If set to both, a bell and a message are produced.  Also see the\nbell-action option.\n\nvisual-silence [on | off | both]\nIf monitor-silence is enabled, prints a message after the interval has expired on a\ngiven window instead of sending a bell.  If set to both, a bell and a message are pro‐\nduced.\n\nword-separators string\nSets the session's conception of what characters are considered word separators, for\nthe purposes of the next and previous word commands in copy mode.  The default is\n‘ -@’.\n\nAvailable window options are:\n\naggressive-resize [on | off]\nAggressively resize the chosen window.  This means that tmux will resize the window to\nthe size of the smallest or largest session (see the window-size option) for which it\nis the current window, rather than the session to which it is attached.  The window may\nresize when the current window is changed on another session; this option is good for\nfull-screen programs which support SIGWINCH and poor for interactive programs such as\nshells.\n\nautomatic-rename [on | off]\nControl automatic window renaming.  When this setting is enabled, tmux will rename the\nwindow automatically using the format specified by automatic-rename-format.  This flag\nis automatically disabled for an individual window when a name is specified at creation\nwith new-window or new-session, or later with rename-window, or with a terminal escape\nsequence.  It may be switched off globally with:\n\nset-option -wg automatic-rename off\n\nautomatic-rename-format format\nThe format (see FORMATS) used when the automatic-rename option is enabled.\n\nclock-mode-colour colour\nSet clock colour.\n\nclock-mode-style [12 | 24]\nSet clock hour format.\n\nmain-pane-height height\nmain-pane-width width\nSet the width or height of the main (left or top) pane in the main-horizontal or\nmain-vertical layouts.  If suffixed by ‘%’, this is a percentage of the window size.\n\ncopy-mode-match-style style\nSet the style of search matches in copy mode.  For how to specify style, see the STYLES\nsection.\n\ncopy-mode-mark-style style\nSet the style of the line containing the mark in copy mode.  For how to specify style,\nsee the STYLES section.\n\ncopy-mode-current-match-style style\nSet the style of the current search match in copy mode.  For how to specify style, see\nthe STYLES section.\n\nmode-keys [vi | emacs]\nUse vi or emacs-style key bindings in copy mode.  The default is emacs, unless VISUAL\nor EDITOR contains ‘vi’.\n\nmode-style style\nSet window modes style.  For how to specify style, see the STYLES section.\n\nmonitor-activity [on | off]\nMonitor for activity in the window.  Windows with activity are highlighted in the sta‐\ntus line.\n\nmonitor-bell [on | off]\nMonitor for a bell in the window.  Windows with a bell are highlighted in the status\nline.\n\nmonitor-silence [interval]\nMonitor for silence (no activity) in the window within interval seconds.  Windows that\nhave been silent for the interval are highlighted in the status line.  An interval of\nzero disables the monitoring.\n\nother-pane-height height\nSet the height of the other panes (not the main pane) in the main-horizontal layout.\nIf this option is set to 0 (the default), it will have no effect.  If both the\nmain-pane-height and other-pane-height options are set, the main pane will grow taller\nto make the other panes the specified height, but will never shrink to do so.  If suf‐\nfixed by ‘%’, this is a percentage of the window size.\n\nother-pane-width width\nLike other-pane-height, but set the width of other panes in the main-vertical layout.\n\npane-active-border-style style\nSet the pane border style for the currently active pane.  For how to specify style, see\nthe STYLES section.  Attributes are ignored.\n\npane-base-index index\nLike base-index, but set the starting index for pane numbers.\n\npane-border-format format\nSet the text shown in pane border status lines.\n\npane-border-lines type\nSet the type of characters used for drawing pane borders.  type may be one of:\n\nsingle  single lines using ACS or UTF-8 characters\n\ndouble  double lines using UTF-8 characters\n\nheavy   heavy lines using UTF-8 characters\n\nsimple  simple ASCII characters\n\nnumber  the pane number\n\n‘double’ and ‘heavy’ will fall back to standard ACS line drawing when UTF-8 is not sup‐\nported.\n\npane-border-status [off | top | bottom]\nTurn pane border status lines off or set their position.\n\npane-border-style style\nSet the pane border style for panes aside from the active pane.  For how to specify\nstyle, see the STYLES section.  Attributes are ignored.\n\nwindow-status-activity-style style\nSet status line style for windows with an activity alert.  For how to specify style,\nsee the STYLES section.\n\nwindow-status-bell-style style\nSet status line style for windows with a bell alert.  For how to specify style, see the\nSTYLES section.\n\nwindow-status-current-format string\nLike window-status-format, but is the format used when the window is the current win‐\ndow.\n\nwindow-status-current-style style\nSet status line style for the currently active window.  For how to specify style, see\nthe STYLES section.\n\nwindow-status-format string\nSet the format in which the window is displayed in the status line window list.  See\nthe FORMATS and STYLES sections.\n\nwindow-status-last-style style\nSet status line style for the last active window.  For how to specify style, see the\nSTYLES section.\n\nwindow-status-separator string\nSets the separator drawn between windows in the status line.  The default is a single\nspace character.\n\nwindow-status-style style\nSet status line style for a single window.  For how to specify style, see the STYLES\nsection.\n\nwindow-size largest | smallest | manual | latest\nConfigure how tmux determines the window size.  If set to largest, the size of the\nlargest attached session is used; if smallest, the size of the smallest.  If manual,\nthe size of a new window is set from the default-size option and windows are resized\nautomatically.  With latest, tmux uses the size of the client that had the most recent\nactivity.  See also the resize-window command and the aggressive-resize option.\n\nwrap-search [on | off]\nIf this option is set, searches will wrap around the end of the pane contents.  The de‐\nfault is on.\n\nAvailable pane options are:\n\nallow-rename [on | off]\nAllow programs in the pane to change the window name using a terminal escape sequence\n(\\ek...\\e\\\\).\n\nalternate-screen [on | off]\nThis option configures whether programs running inside the pane may use the terminal\nalternate screen feature, which allows the smcup and rmcup terminfo(5) capabilities.\nThe alternate screen feature preserves the contents of the window when an interactive\napplication starts and restores it on exit, so that any output visible before the ap‐\nplication starts reappears unchanged after it exits.\n\nremain-on-exit [on | off | failed]\nA pane with this flag set is not destroyed when the program running in it exits.  If\nset to failed, then only when the program exit status is not zero.  The pane may be re‐\nactivated with the respawn-pane command.\n\nsynchronize-panes [on | off]\nDuplicate input to all other panes in the same window where this option is also on\n(only for panes that are not in any mode).\n\nwindow-active-style style\nSet the pane style when it is the active pane.  For how to specify style, see the\nSTYLES section.\n\nwindow-style style\nSet the pane style.  For how to specify style, see the STYLES section.\n\n### HOOKS\n\ntmux allows commands to run on various triggers, called hooks.  Most tmux commands have an\nafter hook and there are a number of hooks not associated with commands.\n\nHooks are stored as array options, members of the array are executed in order when the hook is\ntriggered.  Like options different hooks may be global or belong to a session, window or pane.\nHooks may be configured with the set-hook or set-option commands and displayed with show-hooks\nor show-options -H.  The following two commands are equivalent:\n\nset-hook -g pane-mode-changed[42] 'set -g status-left-style bg=red'\nset-option -g pane-mode-changed[42] 'set -g status-left-style bg=red'\n\nSetting a hook without specifying an array index clears the hook and sets the first member of\nthe array.\n\nA command's after hook is run after it completes, except when the command is run as part of a\nhook itself.  They are named with an ‘after-’ prefix.  For example, the following command adds\na hook to select the even-vertical layout after every split-window:\n\nset-hook -g after-split-window \"selectl even-vertical\"\n\nAll the notifications listed in the CONTROL MODE section are hooks (without any arguments), ex‐\ncept %exit.  The following additional hooks are available:\n\nalert-activity          Run when a window has activity.  See monitor-activity.\n\nalert-bell              Run when a window has received a bell.  See monitor-bell.\n\nalert-silence           Run when a window has been silent.  See monitor-silence.\n\nclient-attached         Run when a client is attached.\n\nclient-detached         Run when a client is detached\n\nclient-resized          Run when a client is resized.\n\nclient-session-changed  Run when a client's attached session is changed.\n\npane-died               Run when the program running in a pane exits, but remain-on-exit is on\nso the pane has not closed.\n\npane-exited             Run when the program running in a pane exits.\n\npane-focus-in           Run when the focus enters a pane, if the focus-events option is on.\n\npane-focus-out          Run when the focus exits a pane, if the focus-events option is on.\n\npane-set-clipboard      Run when the terminal clipboard is set using the xterm(1) escape se‐\nquence.\n\nsession-created         Run when a new session created.\n\nsession-closed          Run when a session closed.\n\nsession-renamed         Run when a session is renamed.\n\nwindow-linked           Run when a window is linked into a session.\n\nwindow-renamed          Run when a window is renamed.\n\nwindow-unlinked         Run when a window is unlinked from a session.\n\nHooks are managed with these commands:\n\nset-hook [-agpRuw] [-t target-pane] hook-name command\nWithout -R, sets (or with -u unsets) hook hook-name to command.  The flags are the same\nas for set-option.\n\nWith -R, run hook-name immediately.\n\nshow-hooks [-gpw] [-t target-pane]\nShows hooks.  The flags are the same as for show-options.\n\n### MOUSE SUPPORT\n\nIf the mouse option is on (the default is off), tmux allows mouse events to be bound as keys.\nThe name of each key is made up of a mouse event (such as ‘MouseUp1’) and a location suffix,\none of the following:\n\nPane             the contents of a pane\nBorder           a pane border\nStatus           the status line window list\nStatusLeft       the left part of the status line\nStatusRight      the right part of the status line\nStatusDefault    any other part of the status line\n\nThe following mouse events are available:\n\nWheelUp       WheelDown\nMouseDown1    MouseUp1      MouseDrag1   MouseDragEnd1\nMouseDown2    MouseUp2      MouseDrag2   MouseDragEnd2\nMouseDown3    MouseUp3      MouseDrag3   MouseDragEnd3\nSecondClick1  SecondClick2  SecondClick3\nDoubleClick1  DoubleClick2  DoubleClick3\nTripleClick1  TripleClick2  TripleClick3\n\nThe ‘SecondClick’ events are fired for the second click of a double click, even if there may be\na third click which will fire ‘TripleClick’ instead of ‘DoubleClick’.\n\nEach should be suffixed with a location, for example ‘MouseDown1Status’.\n\nThe special token ‘{mouse}’ or ‘=’ may be used as target-window or target-pane in commands\nbound to mouse key bindings.  It resolves to the window or pane over which the mouse event took\nplace (for example, the window in the status line over which button 1 was released for a\n‘MouseUp1Status’ binding, or the pane over which the wheel was scrolled for a ‘WheelDownPane’\nbinding).\n\nThe send-keys -M flag may be used to forward a mouse event to a pane.\n\nThe default key bindings allow the mouse to be used to select and resize panes, to copy text\nand to change window using the status line.  These take effect if the mouse option is turned\non.\n\n### FORMATS\n\nCertain commands accept the -F flag with a format argument.  This is a string which controls\nthe output format of the command.  Format variables are enclosed in ‘#{’ and ‘}’, for example\n‘#{sessionname}’.  The possible variables are listed in the table below, or the name of a tmux\noption may be used for an option's value.  Some variables have a shorter alias such as ‘#S’;\n‘##’ is replaced by a single ‘#’, ‘#,’ by a ‘,’ and ‘#}’ by a ‘}’.\n\nConditionals are available by prefixing with ‘?’ and separating two alternatives with a comma;\nif the specified variable exists and is not zero, the first alternative is chosen, otherwise\nthe second is used.  For example ‘#{?sessionattached,attached,not attached}’ will include the\nstring ‘attached’ if the session is attached and the string ‘not attached’ if it is unattached,\nor ‘#{?automatic-rename,yes,no}’ will include ‘yes’ if automatic-rename is enabled, or ‘no’ if\nnot.  Conditionals can be nested arbitrarily.  Inside a conditional, ‘,’ and ‘}’ must be es‐\ncaped as ‘#,’ and ‘#}’, unless they are part of a ‘#{...}’ replacement.  For example:\n\n#{?paneinmode,#[fg=white#,bg=red],#[fg=red#,bg=white]}#W .\n\nString comparisons may be expressed by prefixing two comma-separated alternatives by ‘==’,\n‘!=’, ‘<’, ‘>’, ‘<=’ or ‘>=’ and a colon.  For example ‘#{==:#{host},myhost}’ will be replaced\nby ‘1’ if running on ‘myhost’, otherwise by ‘0’.  ‘||’ and ‘&&’ evaluate to true if either or\nboth of two comma-separated alternatives are true, for example\n‘#{||:#{paneinmode},#{alternateon}}’.\n\nAn ‘m’ specifies an fnmatch(3) or regular expression comparison.  The first argument is the\npattern and the second the string to compare.  An optional argument specifies flags: ‘r’ means\nthe pattern is a regular expression instead of the default fnmatch(3) pattern, and ‘i’ means to\nignore case.  For example: ‘#{m:*foo*,#{host}}’ or ‘#{m/ri:^A,MYVAR}’.  A ‘C’ performs a search\nfor an fnmatch(3) pattern or regular expression in the pane content and evaluates to zero if\nnot found, or a line number if found.  Like ‘m’, an ‘r’ flag means search for a regular expres‐\nsion and ‘i’ ignores case.  For example: ‘#{C/r:^Start}’\n\nNumeric operators may be performed by prefixing two comma-separated alternatives with an ‘e’\nand an operator.  An optional ‘f’ flag may be given after the operator to use floating point\nnumbers, otherwise integers are used.  This may be followed by a number giving the number of\ndecimal places to use for the result.  The available operators are: addition ‘+’, subtraction\n‘-’, multiplication ‘*’, division ‘/’, modulus ‘m’ or ‘%’ (note that ‘%’ must be escaped as\n‘%%’ in formats which are also expanded by strftime(3)) and numeric comparison operators ‘==’,\n‘!=’, ‘<’, ‘<=’, ‘>’ and ‘>=’.  For example, ‘#{e|*|f|4:5.5,3}’ multiplies 5.5 by 3 for a re‐\nsult with four decimal places and ‘#{e|%%:7,3}’ returns the modulus of 7 and 3.  ‘a’ replaces a\nnumeric argument by its ASCII equivalent, so ‘#{a:98}’ results in ‘b’.\n\nA limit may be placed on the length of the resultant string by prefixing it by an ‘=’, a number\nand a colon.  Positive numbers count from the start of the string and negative from the end, so\n‘#{=5:panetitle}’ will include at most the first five characters of the pane title, or\n‘#{=-5:panetitle}’ the last five characters.  A suffix or prefix may be given as a second ar‐\ngument - if provided then it is appended or prepended to the string if the length has been\ntrimmed, for example ‘#{=/5/...:panetitle}’ will append ‘...’ if the pane title is more than\nfive characters.  Similarly, ‘p’ pads the string to a given width, for example\n‘#{p10:panetitle}’ will result in a width of at least 10 characters.  A positive width pads on\nthe left, a negative on the right.  ‘n’ expands to the length of the variable and ‘w’ to its\nwidth when displayed, for example ‘#{n:windowname}’.\n\nPrefixing a time variable with ‘t:’ will convert it to a string, so if ‘#{windowactivity}’\ngives ‘1445765102’, ‘#{t:windowactivity}’ gives ‘Sun Oct 25 09:25:02 2015’.  Adding ‘p (’\n‘`t/p`’) will use shorter but less accurate time format for times in the past.  A custom format\nmay be given using an ‘f’ suffix (note that ‘%’ must be escaped as ‘%%’ if the format is sepa‐\nrately being passed through strftime(3), for example in the status-left option):\n‘#{t/f/%%H#:%%M:windowactivity}’, see strftime(3).\n\nThe ‘b:’ and ‘d:’ prefixes are basename(3) and dirname(3) of the variable respectively.  ‘q:’\nwill escape sh(1) special characters or with a ‘h’ suffix, escape hash characters (so ‘#’ be‐\ncomes ‘##’).  ‘E:’ will expand the format twice, for example ‘#{E:status-left}’ is the result\nof expanding the content of the status-left option rather than the option itself.  ‘T:’ is like\n‘E:’ but also expands strftime(3) specifiers.  ‘S:’, ‘W:’ or ‘P:’ will loop over each session,\nwindow or pane and insert the format once for each.  For windows and panes, two comma-separated\nformats may be given: the second is used for the current window or active pane.  For example,\nto get a list of windows formatted like the status line:\n\n#{W:#{E:window-status-format} ,#{E:window-status-current-format} }\n\n‘N:’ checks if a window (without any suffix or with the ‘w’ suffix) or a session (with the ‘s’\nsuffix) name exists, for example ‘`N/w:foo`’ is replaced with 1 if a window named ‘foo’ exists.\n\nA prefix of the form ‘s/foo/bar/:’ will substitute ‘foo’ with ‘bar’ throughout.  The first ar‐\ngument may be an extended regular expression and a final argument may be ‘i’ to ignore case,\nfor example ‘s/a(.)/\\1x/i:’ would change ‘abABab’ into ‘bxBxbx’.\n\nIn addition, the last line of a shell command's output may be inserted using ‘#()’.  For exam‐\nple, ‘#(uptime)’ will insert the system's uptime.  When constructing formats, tmux does not\nwait for ‘#()’ commands to finish; instead, the previous result from running the same command\nis used, or a placeholder if the command has not been run before.  If the command hasn't ex‐\nited, the most recent line of output will be used, but the status line will not be updated more\nthan once a second.  Commands are executed with the tmux global environment set (see the GLOBAL\nAND SESSION ENVIRONMENT section).\n\nAn ‘l’ specifies that a string should be interpreted literally and not expanded.  For example\n‘#{l:#{?paneinmode,yes,no}}’ will be replaced by ‘#{?paneinmode,yes,no}’.\n\nThe following variables are available, where appropriate:\n\n#### Variable name          Alias    Replaced with\n\nactivewindowindex             Index of active window in session\nalternateon                    1 if pane is in alternate screen\nalternatesavedx               Saved cursor X in alternate screen\nalternatesavedy               Saved cursor Y in alternate screen\nbuffercreated                  Time buffer created\nbuffername                     Name of buffer\nbuffersample                   Sample of start of buffer\nbuffersize                     Size of the specified buffer in bytes\nclientactivity                 Time client last had activity\nclientcellheight              Height of each client cell in pixels\nclientcellwidth               Width of each client cell in pixels\nclientcontrolmode             1 if client is in control mode\nclientcreated                  Time client created\nclientdiscarded                Bytes discarded when client behind\nclientflags                    List of client flags\nclientheight                   Height of client\nclientkeytable                Current key table\nclientlastsession             Name of the client's last session\nclientname                     Name of client\nclientpid                      PID of client process\nclientprefix                   1 if prefix key has been pressed\nclientreadonly                 1 if client is readonly\nclientsession                  Name of the client's session\nclienttermfeatures             Terminal features of client, if any\nclienttermname                 Terminal name of client\nclienttermtype                 Terminal type of client, if available\nclienttty                      Pseudo terminal of client\nclientutf8                     1 if client supports UTF-8\nclientwidth                    Width of client\nclientwritten                  Bytes written to client\ncommand                         Name of command in use, if any\ncommandlistalias              Command alias if listing commands\ncommandlistname               Command name if listing commands\ncommandlistusage              Command usage if listing commands\nconfigfiles                    List of configuration files loaded\ncopycursorline                Line the cursor is on in copy mode\ncopycursorword                Word under cursor in copy mode\ncopycursorx                   Cursor X position in copy mode\ncopycursory                   Cursor Y position in copy mode\ncurrentfile                    Current configuration file\ncursorcharacter                Character at cursor in pane\ncursorflag                     Pane cursor flag\ncursorx                        Cursor X position in pane\ncursory                        Cursor Y position in pane\nhistorybytes                   Number of bytes in window history\nhistorylimit                   Maximum window history lines\nhistorysize                    Size of history in lines\nhook                            Name of running hook, if any\nhookpane                       ID of pane where hook was run, if any\nhooksession                    ID of session where hook was run, if any\nhooksessionname               Name of session where hook was run, if any\nhookwindow                     ID of window where hook was run, if any\nhookwindowname                Name of window where hook was run, if any\nhost                   #H       Hostname of local host\nhostshort             #h       Hostname of local host (no domain name)\ninsertflag                     Pane insert flag\nkeypadcursorflag              Pane keypad cursor flag\nkeypadflag                     Pane keypad flag\nlastwindowindex               Index of last window in session\nline                            Line number in the list\nmouseallflag                  Pane mouse all flag\nmouseanyflag                  Pane mouse any flag\nmousebuttonflag               Pane mouse button flag\nmouseline                      Line under mouse, if any\nmousesgrflag                  Pane mouse SGR flag\nmousestandardflag             Pane mouse standard flag\nmouseutf8flag                 Pane mouse UTF-8 flag\nmouseword                      Word under mouse, if any\nmousex                         Mouse X position, if any\nmousey                         Mouse Y position, if any\noriginflag                     Pane origin flag\npaneactive                     1 if active pane\npaneatbottom                  1 if pane is at the bottom of window\npaneatleft                    1 if pane is at the left of window\npaneatright                   1 if pane is at the right of window\npaneattop                     1 if pane is at the top of window\npanebg                         Pane background colour\npanebottom                     Bottom of pane\npanecurrentcommand            Current command if available\npanecurrentpath               Current path if available\npanedead                       1 if pane is dead\npanedeadstatus                Exit status of process in dead pane\npanefg                         Pane foreground colour\npaneformat                     1 if format is for a pane\npaneheight                     Height of pane\npaneid                #D       Unique pane ID\npaneinmode                    1 if pane is in a mode\npaneindex             #P       Index of pane\npaneinputoff                  1 if input to pane is disabled\npanelast                       1 if last pane\npaneleft                       Left of pane\npanemarked                     1 if this is the marked pane\npanemarkedset                 1 if a marked pane is set\npanemode                       Name of pane mode, if any\npanepath                       Path of pane (can be set by application)\npanepid                        PID of first process in pane\npanepipe                       1 if pane is being piped\npaneright                      Right of pane\npanesearchstring              Last search string in copy mode\npanestartcommand              Command pane started with\npanesynchronized               1 if pane is synchronized\npanetabs                       Pane tab positions\npanetitle             #T       Title of pane (can be set by application)\npanetop                        Top of pane\npanetty                        Pseudo terminal of pane\npanewidth                      Width of pane\npid                             Server PID\nrectangletoggle                1 if rectangle selection is activated\nscrollposition                 Scroll position in copy mode\nscrollregionlower             Bottom of scroll region in pane\nscrollregionupper             Top of scroll region in pane\nsearchmatch                    Search match if any\nsearchpresent                  1 if search started in copy mode\nselectionactive                1 if selection started and changes with the cursor in copy mode\nselectionendx                 X position of the end of the selection\nselectionendy                 Y position of the end of the selection\nselectionpresent               1 if selection started in copy mode\nselectionstartx               X position of the start of the selection\nselectionstarty               Y position of the start of the selection\nsessionactivity                Time of session last activity\nsessionalerts                  List of window indexes with alerts\nsessionattached                Number of clients session is attached to\nsessionattachedlist           List of clients session is attached to\nsessioncreated                 Time session created\nsessionformat                  1 if format is for a session\nsessiongroup                   Name of session group\nsessiongroupattached          Number of clients sessions in group are attached to\nsessiongroupattachedlist     List of clients sessions in group are attached to\nsessiongrouplist              List of sessions in group\nsessiongroupmanyattached     1 if multiple clients attached to sessions in group\nsessiongroupsize              Size of session group\nsessiongrouped                 1 if session in a group\nsessionid                      Unique session ID\nsessionlastattached           Time session last attached\nsessionmanyattached           1 if multiple clients attached\nsessionmarked                  1 if this session contains the marked pane\nsessionname           #S       Name of session\nsessionpath                    Working directory of session\nsessionstack                   Window indexes in most recent order\nsessionwindows                 Number of windows in session\nsocketpath                     Server socket path\nstarttime                      Server start time\nversion                         Server version\nwindowactive                   1 if window active\nwindowactiveclients           Number of clients viewing this window\nwindowactiveclientslist      List of clients viewing this window\nwindowactivesessions          Number of sessions on which this window is active\nwindowactivesessionslist     List of sessions on which this window is active\nwindowactivity                 Time of window last activity\nwindowactivityflag            1 if window has activity\nwindowbellflag                1 if window has bell\nwindowbigger                   1 if window is larger than client\nwindowcellheight              Height of each cell in pixels\nwindowcellwidth               Width of each cell in pixels\nwindowendflag                 1 if window has the highest index\nwindowflags           #F       Window flags with # escaped as ##\nwindowrawflags                Window flags with nothing escaped\nwindowformat                   1 if format is for a window\nwindowheight                   Height of window\nwindowid                       Unique window ID\nwindowindex           #I       Index of window\nwindowlastflag                1 if window is the last used\nwindowlayout                   Window layout description, ignoring zoomed window panes\nwindowlinked                   1 if window is linked across sessions\nwindowlinkedsessions          Number of sessions this window is linked to\nwindowlinkedsessionslist     List of sessions this window is linked to\nwindowmarkedflag              1 if window contains the marked pane\nwindowname            #W       Name of window\nwindowoffsetx                 X offset into window if larger than client\nwindowoffsety                 Y offset into window if larger than client\nwindowpanes                    Number of panes in window\nwindowsilenceflag             1 if window has silence alert\nwindowstackindex              Index in session most recent stack\nwindowstartflag               1 if window has the lowest index\nwindowvisiblelayout           Window layout description, respecting zoomed window panes\nwindowwidth                    Width of window\nwindowzoomedflag              1 if window is zoomed\nwrapflag                       Pane wrap flag\n\n### STYLES\n\ntmux offers various options to specify the colour and attributes of aspects of the interface,\nfor example status-style for the status line.  In addition, embedded styles may be specified in\nformat options, such as status-left, by enclosing them in ‘#[’ and ‘]’.\n\nA style may be the single term ‘default’ to specify the default style (which may come from an\noption, for example status-style in the status line) or a space or comma separated list of the\nfollowing:\n\n#### fg=colour\n\nSet the foreground colour.  The colour is one of: black, red, green, yellow, blue,\nmagenta, cyan, white; if supported the bright variants brightred, brightgreen,\nbrightyellow; colour0 to colour255 from the 256-colour set; default for the default\ncolour; terminal for the terminal default colour; or a hexadecimal RGB string such as\n‘#ffffff’.\n\n#### bg=colour\n\nSet the background colour.\n\nnone    Set no attributes (turn off any active attributes).\n\nacs, bright (or bold), dim, underscore, blink, reverse, hidden, italics, overline,\nstrikethrough, double-underscore, curly-underscore, dotted-underscore,\ndashed-underscore\nSet an attribute.  Any of the attributes may be prefixed with ‘no’ to unset.  acs is\nthe terminal alternate character set.\n\nalign=left (or noalign), align=centre, align=right\nAlign text to the left, centre or right of the available space if appropriate.\n\n#### fill=colour\n\nFill the available space with a background colour if appropriate.\n\nlist=on, list=focus, list=left-marker, list=right-marker, nolist\nMark the position of the various window list components in the status-format option:\nlist=on marks the start of the list; list=focus is the part of the list that should be\nkept in focus if the entire list won't fit in the available space (typically the cur‐\nrent window); list=left-marker and list=right-marker mark the text to be used to mark\nthat text has been trimmed from the left or right of the list if there is not enough\nspace.\n\npush-default, pop-default\nStore the current colours and attributes as the default or reset to the previous de‐\nfault.  A push-default affects any subsequent use of the default term until a\npop-default.  Only one default may be pushed (each push-default replaces the previous\nsaved default).\n\nrange=left, range=right, range=window|X, norange\nMark a range in the status-format option.  range=left and range=right are the text used\nfor the ‘StatusLeft’ and ‘StatusRight’ mouse keys.  range=window|X is the range for a\nwindow passed to the ‘Status’ mouse key, where ‘X’ is a window index.\n\nExamples are:\n\nfg=yellow bold underscore blink\nbg=black,fg=default,noreverse\n\n### NAMES AND TITLES\n\ntmux distinguishes between names and titles.  Windows and sessions have names, which may be\nused to specify them in targets and are displayed in the status line and various lists: the\nname is the tmux identifier for a window or session.  Only panes have titles.  A pane's title\nis typically set by the program running inside the pane using an escape sequence (like it would\nset the xterm(1) window title in X(7)).  Windows themselves do not have titles - a window's ti‐\ntle is the title of its active pane.  tmux itself may set the title of the terminal in which\nthe client is running, see the set-titles option.\n\nA session's name is set with the new-session and rename-session commands.  A window's name is\nset with one of:\n\n1.      A command argument (such as -n for new-window or new-session).\n\n2.      An escape sequence (if the allow-rename option is turned on):\n\n$ printf '\\033kWINDOWNAME\\033\\\\'\n\n3.      Automatic renaming, which sets the name to the active command in the window's active\npane.  See the automatic-rename option.\n\nWhen a pane is first created, its title is the hostname.  A pane's title can be set via the ti‐\ntle setting escape sequence, for example:\n\n$ printf '\\033]2;My Title\\033\\\\'\n\nIt can also be modified with the select-pane -T command.\n\n### GLOBAL AND SESSION ENVIRONMENT\n\nWhen the server is started, tmux copies the environment into the global environment; in addi‐\ntion, each session has a session environment.  When a window is created, the session and global\nenvironments are merged.  If a variable exists in both, the value from the session environment\nis used.  The result is the initial environment passed to the new process.\n\nThe update-environment session option may be used to update the session environment from the\nclient when a new session is created or an old reattached.  tmux also initialises the TMUX\nvariable with some internal information to allow commands to be executed from inside, and the\nTERM variable with the correct terminal setting of ‘screen’.\n\nVariables in both session and global environments may be marked as hidden.  Hidden variables\nare not passed into the environment of new processes and instead can only be used by tmux it‐\nself (for example in formats, see the FORMATS section).\n\nCommands to alter and view the environment are:\n\nset-environment [-Fhgru] [-t target-session] name [value]\n(alias: setenv)\nSet or unset an environment variable.  If -g is used, the change is made in the global\nenvironment; otherwise, it is applied to the session environment for target-session.\nIf -F is present, then value is expanded as a format.  The -u flag unsets a variable.\n-r indicates the variable is to be removed from the environment before starting a new\nprocess.  -h marks the variable as hidden.\n\nshow-environment [-hgs] [-t target-session] [variable]\n(alias: showenv)\nDisplay the environment for target-session or the global environment with -g.  If\nvariable is omitted, all variables are shown.  Variables removed from the environment\nare prefixed with ‘-’.  If -s is used, the output is formatted as a set of Bourne shell\ncommands.  -h shows hidden variables (omitted by default).\n\n### STATUS LINE\n\ntmux includes an optional status line which is displayed in the bottom line of each terminal.\n\nBy default, the status line is enabled and one line in height (it may be disabled or made mul‐\ntiple lines with the status session option) and contains, from left-to-right: the name of the\ncurrent session in square brackets; the window list; the title of the active pane in double\nquotes; and the time and date.\n\nEach line of the status line is configured with the status-format option.  The default is made\nof three parts: configurable left and right sections (which may contain dynamic content such as\nthe time or output from a shell command, see the status-left, status-left-length, status-right,\nand status-right-length options below), and a central window list.  By default, the window list\nshows the index, name and (if any) flag of the windows present in the current session in as‐\ncending numerical order.  It may be customised with the window-status-format and\nwindow-status-current-format options.  The flag is one of the following symbols appended to the\nwindow name:\n\nSymbol    Meaning\n*         Denotes the current window.\n-         Marks the last window (previously selected).\n#         Window activity is monitored and activity has been detected.\n!         Window bells are monitored and a bell has occurred in the window.\n~         The window has been silent for the monitor-silence interval.\nM         The window contains the marked pane.\nZ         The window's active pane is zoomed.\n\nThe # symbol relates to the monitor-activity window option.  The window name is printed in in‐\nverted colours if an alert (bell, activity or silence) is present.\n\nThe colour and attributes of the status line may be configured, the entire status line using\nthe status-style session option and individual windows using the window-status-style window op‐\ntion.\n\nThe status line is automatically refreshed at interval if it has changed, the interval may be\ncontrolled with the status-interval session option.\n\nCommands related to the status line are as follows:\n\ncommand-prompt [-1ikNTW] [-I inputs] [-p prompts] [-t target-client] [template]\nOpen the command prompt in a client.  This may be used from inside tmux to execute com‐\nmands interactively.\n\nIf template is specified, it is used as the command.  If present, -I is a comma-sepa‐\nrated list of the initial text for each prompt.  If -p is given, prompts is a comma-\nseparated list of prompts which are displayed in order; otherwise a single prompt is\ndisplayed, constructed from template if it is present, or ‘:’ if not.\n\nBefore the command is executed, the first occurrence of the string ‘%%’ and all occur‐\nrences of ‘%1’ are replaced by the response to the first prompt, all ‘%2’ are replaced\nwith the response to the second prompt, and so on for further prompts.  Up to nine\nprompt responses may be replaced (‘%1’ to ‘%9’).  ‘%%%’ is like ‘%%’ but any quotation\nmarks are escaped.\n\n-1 makes the prompt only accept one key press, in this case the resulting input is a\nsingle character.  -k is like -1 but the key press is translated to a key name.  -N\nmakes the prompt only accept numeric key presses.  -i executes the command every time\nthe prompt input changes instead of when the user exits the command prompt.  -T tells\ntmux that the prompt is for a target which affects what completions are offered when\nTab is pressed; -W is similar but indicates the prompt is for a window.\n\nThe following keys have a special meaning in the command prompt, depending on the value\nof the status-keys option:\n\nFunction                             vi        emacs\nCancel command prompt                q         Escape\nDelete from cursor to start of word            C-w\nDelete entire command                d         C-u\nDelete from cursor to end            D         C-k\nExecute command                      Enter     Enter\nGet next command from history                  Down\nGet previous command from history              Up\nInsert top paste buffer              p         C-y\nLook for completions                 Tab       Tab\nMove cursor left                     h         Left\nMove cursor right                    l         Right\nMove cursor to end                   $         C-e\nMove cursor to next word             w         M-f\nMove cursor to previous word         b         M-b\nMove cursor to start                 0         C-a\nTranspose characters                           C-t\n\nconfirm-before [-p prompt] [-t target-client] command\n(alias: confirm)\nAsk for confirmation before executing command.  If -p is given, prompt is the prompt to\ndisplay; otherwise a prompt is constructed from command.  It may contain the special\ncharacter sequences supported by the status-left option.\n\nThis command works only from inside tmux.\n\ndisplay-menu [-O] [-c target-client] [-t target-pane] [-T title] [-x position] [-y position]\nname key command ...\n(alias: menu)\nDisplay a menu on target-client.  target-pane gives the target for any commands run\nfrom the menu.\n\nA menu is passed as a series of arguments: first the menu item name, second the key\nshortcut (or empty for none) and third the command to run when the menu item is chosen.\nThe name and command are formats, see the FORMATS and STYLES sections.  If the name be‐\ngins with a hyphen (-), then the item is disabled (shown dim) and may not be chosen.\nThe name may be empty for a separator line, in which case both the key and command\nshould be omitted.\n\n-T is a format for the menu title (see FORMATS).\n\n-x and -y give the position of the menu.  Both may be a row or column number, or one of\nthe following special values:\n\nValue    Flag    Meaning\nC        Both    The centre of the terminal\nR        -x      The right side of the terminal\nP        Both    The bottom left of the pane\nM        Both    The mouse position\nW        Both    The window position on the status line\nS        -y      The line above or below the status line\n\nOr a format, which is expanded including the following additional variables:\n\nVariable name                 Replaced with\npopupcentrex                Centered in the client\npopupcentrey                Centered in the client\npopupheight                  Height of menu or popup\npopupmousebottom            Bottom of at the mouse\npopupmousecentrex          Horizontal centre at the mouse\npopupmousecentrey          Vertical centre at the mouse\npopupmousetop               Top at the mouse\npopupmousex                 Mouse X position\npopupmousey                 Mouse Y position\npopuppanebottom             Bottom of the pane\npopuppaneleft               Left of the pane\npopuppaneright              Right of the pane\npopuppanetop                Top of the pane\npopupstatusliney           Above or below the status line\npopupwidth                   Width of menu or popup\npopupwindowstatuslinex    At the window position in status line\npopupwindowstatusliney    At the status line showing the window\n\nEach menu consists of items followed by a key shortcut shown in brackets.  If the menu\nis too large to fit on the terminal, it is not displayed.  Pressing the key shortcut\nchooses the corresponding item.  If the mouse is enabled and the menu is opened from a\nmouse key binding, releasing the mouse button with an item selected chooses that item\nand releasing the mouse button without an item selected closes the menu.  -O changes\nthis behaviour so that the menu does not close when the mouse button is released with‐\nout an item selected the menu is not closed and a mouse button must be clicked to\nchoose an item.\n\nThe following keys are also available:\n\nKey    Function\nEnter  Choose selected item\nUp     Select previous item\nDown   Select next item\nq      Exit menu\n\ndisplay-message [-aINpv] [-c target-client] [-d delay] [-t target-pane] [message]\n(alias: display)\nDisplay a message.  If -p is given, the output is printed to stdout, otherwise it is\ndisplayed in the target-client status line for up to delay milliseconds.  If delay is\nnot given, the message-time option is used; a delay of zero waits for a key press.  ‘N’\nignores key presses and closes only after the delay expires.  The format of message is\ndescribed in the FORMATS section; information is taken from target-pane if -t is given,\notherwise the active pane.\n\n-v prints verbose logging as the format is parsed and -a lists the format variables and\ntheir values.\n\n-I forwards any input read from stdin to the empty pane given by target-pane.\n\ndisplay-popup [-CE] [-c target-client] [-d start-directory] [-h height] [-t target-pane] [-w\nwidth] [-x position] [-y position] [shell-command]\n(alias: popup)\nDisplay a popup running shell-command on target-client.  A popup is a rectangular box\ndrawn over the top of any panes.  Panes are not updated while a popup is present.\n\n-E closes the popup automatically when shell-command exits.  Two -E closes the popup\nonly if shell-command exited with success.\n\n-x and -y give the position of the popup, they have the same meaning as for the\ndisplay-menu command.  -w and -h give the width and height - both may be a percentage\n(followed by ‘%’).  If omitted, half of the terminal size is used.\n\nThe -C flag closes any popup on the client.\n\n### BUFFERS\n\ntmux maintains a set of named paste buffers.  Each buffer may be either explicitly or automati‐\ncally named.  Explicitly named buffers are named when created with the set-buffer or\nload-buffer commands, or by renaming an automatically named buffer with set-buffer -n.  Auto‐\nmatically named buffers are given a name such as ‘buffer0001’, ‘buffer0002’ and so on.  When\nthe buffer-limit option is reached, the oldest automatically named buffer is deleted.  Explic‐\nitly named buffers are not subject to buffer-limit and may be deleted with the delete-buffer\ncommand.\n\nBuffers may be added using copy-mode or the set-buffer and load-buffer commands, and pasted\ninto a window using the paste-buffer command.  If a buffer command is used and no buffer is\nspecified, the most recently added automatically named buffer is assumed.\n\nA configurable history buffer is also maintained for each window.  By default, up to 2000 lines\nare kept; this can be altered with the history-limit option (see the set-option command above).\n\nThe buffer commands are as follows:\n\nchoose-buffer [-NZr] [-F format] [-f filter] [-K key-format] [-O sort-order] [-t target-pane]\n[template]\nPut a pane into buffer mode, where a buffer may be chosen interactively from a list.\nEach buffer is shown on one line.  A shortcut key is shown on the left in brackets al‐\nlowing for immediate choice, or the list may be navigated and an item chosen or other‐\nwise manipulated using the keys below.  -Z zooms the pane.  The following keys may be\nused in buffer mode:\n\nKey    Function\nEnter  Paste selected buffer\nUp     Select previous buffer\nDown   Select next buffer\nC-s    Search by name or content\nn      Repeat last search\nt      Toggle if buffer is tagged\nT      Tag no buffers\nC-t    Tag all buffers\np      Paste selected buffer\nP      Paste tagged buffers\nd      Delete selected buffer\nD      Delete tagged buffers\ne      Open the buffer in an editor\nf      Enter a format to filter items\nO      Change sort field\nr      Reverse sort order\nv      Toggle preview\nq      Exit mode\n\nAfter a buffer is chosen, ‘%%’ is replaced by the buffer name in template and the re‐\nsult executed as a command.  If template is not given, \"paste-buffer -b '%%'\" is used.\n\n-O specifies the initial sort field: one of ‘time’, ‘name’ or ‘size’.  -r reverses the\nsort order.  -f specifies an initial filter: the filter is a format - if it evaluates\nto zero, the item in the list is not shown, otherwise it is shown.  If a filter would\nlead to an empty list, it is ignored.  -F specifies the format for each item in the\nlist and -K a format for each shortcut key; both are evaluated once for each line.  -N\nstarts without the preview.  This command works only if at least one client is at‐\ntached.\n\nclear-history [-t target-pane]\n(alias: clearhist)\nRemove and free the history for the specified pane.\n\ndelete-buffer [-b buffer-name]\n(alias: deleteb)\nDelete the buffer named buffer-name, or the most recently added automatically named\nbuffer if not specified.\n\nlist-buffers [-F format] [-f filter]\n(alias: lsb)\nList the global buffers.  -F specifies the format of each line and -f a filter.  Only\nbuffers for which the filter is true are shown.  See the FORMATS section.\n\nload-buffer [-w] [-b buffer-name] [-t target-client] path\n(alias: loadb)\nLoad the contents of the specified paste buffer from path.  If -w is given, the buffer\nis also sent to the clipboard for target-client using the xterm(1) escape sequence, if\npossible.\n\npaste-buffer [-dpr] [-b buffer-name] [-s separator] [-t target-pane]\n(alias: pasteb)\nInsert the contents of a paste buffer into the specified pane.  If not specified, paste\ninto the current one.  With -d, also delete the paste buffer.  When output, any line‐\nfeed (LF) characters in the paste buffer are replaced with a separator, by default car‐\nriage return (CR).  A custom separator may be specified using the -s flag.  The -r flag\nmeans to do no replacement (equivalent to a separator of LF).  If -p is specified,\npaste bracket control codes are inserted around the buffer if the application has re‐\nquested bracketed paste mode.\n\nsave-buffer [-a] [-b buffer-name] path\n(alias: saveb)\nSave the contents of the specified paste buffer to path.  The -a option appends to\nrather than overwriting the file.\n\nset-buffer [-aw] [-b buffer-name] [-t target-client] [-n new-buffer-name] data\n(alias: setb)\nSet the contents of the specified buffer to data.  If -w is given, the buffer is also\nsent to the clipboard for target-client using the xterm(1) escape sequence, if possi‐\nble.  The -a option appends to rather than overwriting the buffer.  The -n option re‐\nnames the buffer to new-buffer-name.\n\nshow-buffer [-b buffer-name]\n(alias: showb)\nDisplay the contents of the specified buffer.\n\n### MISCELLANEOUS\n\nMiscellaneous commands are as follows:\n\nclock-mode [-t target-pane]\nDisplay a large clock.\n\nif-shell [-bF] [-t target-pane] shell-command command [command]\n(alias: if)\nExecute the first command if shell-command returns success or the second command other‐\nwise.  Before being executed, shell-command is expanded using the rules specified in\nthe FORMATS section, including those relevant to target-pane.  With -b, shell-command\nis run in the background.\n\nIf -F is given, shell-command is not executed but considered success if neither empty\nnor zero (after formats are expanded).\n\n#### lock-server\n\n(alias: lock)\nLock each client individually by running the command specified by the lock-command op‐\ntion.\n\nrun-shell [-bC] [-d delay] [-t target-pane] [shell-command]\n(alias: run)\nExecute shell-command or (with -C) a tmux command in the background without creating a\nwindow.  Before being executed, shell-command is expanded using the rules specified in\nthe FORMATS section.  With -b, the command is run in the background.  -d waits for\ndelay seconds before starting the command.  If -C is not given, any output to stdout is\ndisplayed in view mode (in the pane specified by -t or the current pane if omitted) af‐\nter the command finishes.  If the command fails, the exit status is also displayed.\n\nwait-for [-L | -S | -U] channel\n(alias: wait)\nWhen used without options, prevents the client from exiting until woken using wait-for\n-S with the same channel.  When -L is used, the channel is locked and any clients that\ntry to lock the same channel are made to wait until the channel is unlocked with\nwait-for -U.\n\n### EXIT MESSAGES\n\nWhen a tmux client detaches, it prints a message.  This may be one of:\n\ndetached (from session ...)\nThe client was detached normally.\n\ndetached and SIGHUP\nThe client was detached and its parent sent the SIGHUP signal (for example with\ndetach-client -P).\n\nlost tty\nThe client's tty(4) or pty(4) was unexpectedly destroyed.\n\nterminated\nThe client was killed with SIGTERM.\n\ntoo far behind\nThe client is in control mode and became unable to keep up with the data from tmux.\n\nexited  The server exited when it had no sessions.\n\nserver exited\nThe server exited when it received SIGTERM.\n\nserver exited unexpectedly\nThe server crashed or otherwise exited without telling the client the reason.\n\n### TERMINFO EXTENSIONS\n\ntmux understands some unofficial extensions to terminfo(5).  It is not normally necessary to\nset these manually, instead the terminal-features option should be used.\n\nAX      An existing extension that tells tmux the terminal supports default colours.\n\nBidi    Tell tmux that the terminal supports the VTE bidirectional text extensions.\n\nCs, Cr  Set the cursor colour.  The first takes a single string argument and is used to set the\ncolour; the second takes no arguments and restores the default cursor colour.  If set,\na sequence such as this may be used to change the cursor colour from inside tmux:\n\n$ printf '\\033]12;red\\033\\\\'\n\nCmg, Clmg, Dsmg, Enmg\nSet, clear, disable or enable DECSLRM margins.  These are set automatically if the ter‐\nminal reports it is VT420 compatible.\n\nDsbp, Enbp\nDisable and enable bracketed paste.  These are set automatically if the XT capability\nis present.\n\nDseks, Eneks\nDisable and enable extended keys.\n\nDsfcs, Enfcs\nDisable and enable focus reporting.  These are set automatically if the XT capability\nis present.\n\nRect    Tell tmux that the terminal supports rectangle operations.\n\nSmol    Enable the overline attribute.\n\nSmulx   Set a styled underscore.  The single parameter is one of: 0 for no underscore, 1 for\nnormal underscore, 2 for double underscore, 3 for curly underscore, 4 for dotted under‐\nscore and 5 for dashed underscore.\n\nSetulc, ol\nSet the underscore colour or reset to the default.  The argument is (red * 65536) +\n(green * 256) + blue where each is between 0 and 255.\n\nSs, Se  Set or reset the cursor style.  If set, a sequence such as this may be used to change\nthe cursor to an underline:\n\n$ printf '\\033[4 q'\n\nIf Se is not set, Ss with argument 0 will be used to reset the cursor style instead.\n\nSync    Start (parameter is 1) or end (parameter is 2) a synchronized update.\n\nTc      Indicate that the terminal supports the ‘direct colour’ RGB escape sequence (for exam‐\nple, \\e[38;2;255;255;255m).\n\nIf supported, this is used for the initialize colour escape sequence (which may be en‐\nabled by adding the ‘initc’ and ‘ccc’ capabilities to the tmux terminfo(5) entry).\n\nThis is equivalent to the RGB terminfo(5) capability.\n\nMs      Store the current buffer in the host terminal's selection (clipboard).  See the\nset-clipboard option above and the xterm(1) man page.\n\nXT      This is an existing extension capability that tmux uses to mean that the terminal sup‐\nports the xterm(1) title set sequences and to automatically set some of the capabili‐\nties above.\n\n### CONTROL MODE\n\ntmux offers a textual interface called control mode.  This allows applications to communicate\nwith tmux using a simple text-only protocol.\n\nIn control mode, a client sends tmux commands or command sequences terminated by newlines on\nstandard input.  Each command will produce one block of output on standard output.  An output\nblock consists of a %begin line followed by the output (which may be empty).  The output block\nends with a %end or %error.  %begin and matching %end or %error have three arguments: an inte‐\nger time (as seconds from epoch), command number and flags (currently not used).  For example:\n\n%begin 1363006971 2 1\n0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)\n%end 1363006971 2 1\n\nThe refresh-client -C command may be used to set the size of a client in control mode.\n\nIn control mode, tmux outputs notifications.  A notification will never occur inside an output\nblock.\n\nThe following notifications are defined:\n\n%client-detached client\nThe client has detached.\n\n%client-session-changed client session-id name\nThe client is now attached to the session with ID session-id, which is named name.\n\n%continue pane-id\nThe pane has been continued after being paused (if the pause-after flag is set, see\nrefresh-client -A).\n\n%exit [reason]\nThe tmux client is exiting immediately, either because it is not attached to any ses‐\nsion or an error occurred.  If present, reason describes why the client exited.\n\n%extended-output pane-id age ... : value\nNew form of %output sent when the pause-after flag is set.  age is the time in mil‐\nliseconds for which tmux had buffered the output before it was sent.  Any subsequent\narguments up until a single ‘:’ are for future use and should be ignored.\n\n%layout-change window-id window-layout window-visible-layout window-flags\nThe layout of a window with ID window-id changed.  The new layout is window-layout.\nThe window's visible layout is window-visible-layout and the window flags are\nwindow-flags.\n\n%output pane-id value\nA window pane produced output.  value escapes non-printable characters and backslash as\noctal \\xxx.\n\n%pane-mode-changed pane-id\nThe pane with ID pane-id has changed mode.\n\n%pause pane-id\nThe pane has been paused (if the pause-after flag is set).\n\n%session-changed session-id name\nThe client is now attached to the session with ID session-id, which is named name.\n\n%session-renamed name\nThe current session was renamed to name.\n\n%session-window-changed session-id window-id\nThe session with ID session-id changed its active window to the window with ID\nwindow-id.\n\n#### %sessions-changed\n\nA session was created or destroyed.\n\n%subscription-changed name session-id window-id window-index pane-id ... : value\nThe value of the format associated with subscription name has changed to value.  See\nrefresh-client -B.  Any arguments after pane-id up until a single ‘:’ are for future\nuse and should be ignored.\n\n%unlinked-window-add window-id\nThe window with ID window-id was created but is not linked to the current session.\n\n%window-add window-id\nThe window with ID window-id was linked to the current session.\n\n%window-close window-id\nThe window with ID window-id closed.\n\n%window-pane-changed window-id pane-id\nThe active pane in the window with ID window-id changed to the pane with ID pane-id.\n\n%window-renamed window-id name\nThe window with ID window-id was renamed to name.\n\n### ENVIRONMENT\n\nWhen tmux is started, it inspects the following environment variables:\n\nEDITOR    If the command specified in this variable contains the string ‘vi’ and VISUAL is un‐\nset, use vi-style key bindings.  Overridden by the mode-keys and status-keys options.\n\nHOME      The user's login directory.  If unset, the passwd(5) database is consulted.\n\nLCCTYPE  The character encoding locale(1).  It is used for two separate purposes.  For output\nto the terminal, UTF-8 is used if the -u option is given or if LCCTYPE contains\n\"UTF-8\" or \"UTF8\".  Otherwise, only ASCII characters are written and non-ASCII char‐\nacters are replaced with underscores (‘’).  For input, tmux always runs with a UTF-8\nlocale.  If enUS.UTF-8 is provided by the operating system it is used and LCCTYPE\nis ignored for input.  Otherwise, LCCTYPE tells tmux what the UTF-8 locale is called\non the current system.  If the locale specified by LCCTYPE is not available or is\nnot a UTF-8 locale, tmux exits with an error message.\n\nLCTIME   The date and time format locale(1).  It is used for locale-dependent strftime(3) for‐\nmat specifiers.\n\nPWD       The current working directory to be set in the global environment.  This may be use‐\nful if it contains symbolic links.  If the value of the variable does not match the\ncurrent working directory, the variable is ignored and the result of getcwd(3) is\nused instead.\n\nSHELL     The absolute path to the default shell for new windows.  See the default-shell option\nfor details.\n\nTMUXTMPDIR\nThe parent directory of the directory containing the server sockets.  See the -L op‐\ntion for details.\n\nVISUAL    If the command specified in this variable contains the string ‘vi’, use vi-style key\nbindings.  Overridden by the mode-keys and status-keys options.\n\n### FILES\n\n~/.tmux.conf       Default tmux configuration file.\n/etc/tmux.conf     System-wide configuration file.\n\n### EXAMPLES\n\nTo create a new tmux session running vi(1):\n\n$ tmux new-session vi\n\nMost commands have a shorter form, known as an alias.  For new-session, this is new:\n\n$ tmux new vi\n\nAlternatively, the shortest unambiguous form of a command is accepted.  If there are several\noptions, they are listed:\n\n$ tmux n\nambiguous command: n, could be: new-session, new-window, next-window\n\nWithin an active session, a new window may be created by typing ‘C-b c’ (Ctrl followed by the\n‘b’ key followed by the ‘c’ key).\n\nWindows may be navigated with: ‘C-b 0’ (to select window 0), ‘C-b 1’ (to select window 1), and\nso on; ‘C-b n’ to select the next window; and ‘C-b p’ to select the previous window.\n\nA session may be detached using ‘C-b d’ (or by an external event such as ssh(1) disconnection)\nand reattached with:\n\n$ tmux attach-session\n\nTyping ‘C-b ?’ lists the current key bindings in the current window; up and down may be used to\nnavigate the list or ‘q’ to exit from it.\n\nCommands to be run when the tmux server is started may be placed in the ~/.tmux.conf configura‐\ntion file.  Common examples include:\n\nChanging the default prefix key:\n\nset-option -g prefix C-a\nunbind-key C-b\nbind-key C-a send-prefix\n\nTurning the status line off, or changing its colour:\n\nset-option -g status off\nset-option -g status-style bg=blue\n\nSetting other options, such as the default command, or locking after 30 minutes of inactivity:\n\nset-option -g default-command \"exec /bin/ksh\"\nset-option -g lock-after-time 1800\n\nCreating new key bindings:\n\nbind-key b set-option status\nbind-key / command-prompt \"split-window 'exec man %%'\"\nbind-key S command-prompt \"new-window -n %1 'ssh %1'\"\n\n### SEE ALSO\n\npty(4)\n\n### AUTHORS\n\nNicholas Marriott <nicholas.marriott@gmail.com>\n\nBSD                              June 3, 2026                              BSD\n\n"
        }
    ],
    "structuredContent": {
        "command": "TMUX",
        "section": "1",
        "mode": "man",
        "summary": "tmux — terminal multiplexer",
        "synopsis": "tmux [-2CDluvV] [-c shell-command] [-f file] [-L socket-name] [-S socket-path] [-T features]\n[command [flags]]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-T",
                "long": null,
                "arg": null,
                "description": "256."
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "echo."
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "Execute shell-command using the default shell. If necessary, the tmux server will be started to retrieve the default-shell option. This option is for compat‐ ibility with sh(1) when tmux is used as a login shell."
            },
            {
                "flag": "-D",
                "long": null,
                "arg": null,
                "description": "off. With -D, command may not be specified."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "configuration file from /etc/tmux.conf, if present, then looks for a user config‐ uration file at ~/.tmux.conf. The configuration file is a set of tmux commands which are executed in sequence when the server is first started. tmux loads configuration files once when the server process has started. The source-file command may be used to load a file later. tmux shows any error messages from commands in configuration files in the first session created, and continues to process the rest of the configuration file."
            },
            {
                "flag": "-L",
                "long": null,
                "arg": null,
                "description": "tmux stores the server socket in a directory under TMUXTMPDIR or /tmp if it is unset. The default socket is named default. This option allows a different socket name to be specified, allowing several independent tmux servers to be run. Unlike -S a full path is not necessary: the sockets are all created in a direc‐ tory tmux-UID under the directory given by TMUXTMPDIR or in /tmp. The tmux-UID directory is created by tmux and must not be world readable, writable or exe‐ cutable. If the socket is accidentally removed, the SIGUSR1 signal may be sent to the tmux server process to recreate it (note that this will fail if any parent directories are missing)."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "bility with other shells when using tmux as a login shell."
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "new-session or start-server)."
            },
            {
                "flag": "-S",
                "long": null,
                "arg": null,
                "description": "Specify a full alternative path to the server socket. If -S is specified, the default socket directory is not used and any -L flag is ignored."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "LCALL, LCCTYPE, or LANG that is set does not contain \"UTF-8\" or \"UTF8\". This is equivalent to -T UTF-8."
            },
            {
                "flag": "-T",
                "long": null,
                "arg": null,
                "description": "tures. See the terminal-features option."
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "tmux-server-PID.log files in the current directory, where PID is the PID of the server or client process. If -v is specified twice, an additional tmux-out-PID.log file is generated with a copy of everything tmux writes to the terminal. The SIGUSR2 signal may be sent to the tmux server process to toggle logging be‐ tween on (as if -v was given) and off."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": "command [flags] This specifies one of a set of commands used to control tmux, as described in the following sections. If no commands are specified, the new-session command is as‐ sumed."
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": "‘search-reverse’ does the same but reverses the direction (forward becomes backward and back‐ ward becomes forward). Copy commands may take an optional buffer prefix argument which is used to generate the buffer name (the default is ‘buffer’ so buffers are named ‘buffer0’, ‘buffer1’ and so on). Pipe com‐ mands take a command argument which is the command to which the selected text is piped. ‘copy-pipe’ variants also copy the selection. The ‘-and-cancel’ variants of some commands exit copy mode after they have completed (for copy commands) or when the cursor reaches the bottom (for scrolling commands). ‘-no-clear’ variants do not clear the selection. The next and previous word keys use space and the ‘-’, ‘’ and ‘@’ characters as word delim‐ iters by default, but this can be adjusted by setting the word-separators session option. Next word moves to the start of the next word, next word end to the end of the next word and previ‐ ous word to the start of the previous word. The three next and previous space keys work simi‐ larly but use a space alone as the word separator. The jump commands enable quick movement within a line. For instance, typing ‘f’ followed by ‘/’ will move the cursor to the next ‘/’ character on the current line. A ‘;’ will then jump to the next occurrence. Commands in copy mode may be prefaced by an optional repeat count. With vi key bindings, a prefix is entered using the number keys; with emacs, the Alt (meta) key and a number begins prefix entry. The synopsis for the copy-mode command is: copy-mode [-eHMqu] [-s src-pane] [-t target-pane] Enter copy mode. The -u option scrolls one page up. -M begins a mouse drag (only valid if bound to a mouse key binding, see MOUSE SUPPORT). -H hides the position indi‐ cator in the top right. -q cancels copy mode and any other modes. -s copies from src-pane instead of target-pane. -e specifies that scrolling to the bottom of the history (to the visible screen) should exit copy mode. While in copy mode, pressing a key other than those used for scrolling will disable this behaviour. This is intended to allow fast scrolling through a pane's history, for example with: bind PageUp copy-mode -eu A number of preset arrangements of panes are available, these are called layouts. These may be selected with the select-layout command or cycled with next-layout (bound to ‘Space’ by de‐ fault); once a layout is chosen, panes within it may be moved and resized as normal. The following layouts are supported:"
            }
        ],
        "examples": [
            "To create a new tmux session running vi(1):",
            "$ tmux new-session vi",
            "Most commands have a shorter form, known as an alias.  For new-session, this is new:",
            "$ tmux new vi",
            "Alternatively, the shortest unambiguous form of a command is accepted.  If there are several",
            "options, they are listed:",
            "$ tmux n",
            "ambiguous command: n, could be: new-session, new-window, next-window",
            "Within an active session, a new window may be created by typing ‘C-b c’ (Ctrl followed by the",
            "‘b’ key followed by the ‘c’ key).",
            "Windows may be navigated with: ‘C-b 0’ (to select window 0), ‘C-b 1’ (to select window 1), and",
            "so on; ‘C-b n’ to select the next window; and ‘C-b p’ to select the previous window.",
            "A session may be detached using ‘C-b d’ (or by an external event such as ssh(1) disconnection)",
            "and reattached with:",
            "$ tmux attach-session",
            "Typing ‘C-b ?’ lists the current key bindings in the current window; up and down may be used to",
            "navigate the list or ‘q’ to exit from it.",
            "Commands to be run when the tmux server is started may be placed in the ~/.tmux.conf configura‐",
            "tion file.  Common examples include:",
            "Changing the default prefix key:",
            "set-option -g prefix C-a",
            "unbind-key C-b",
            "bind-key C-a send-prefix",
            "Turning the status line off, or changing its colour:",
            "set-option -g status off",
            "set-option -g status-style bg=blue",
            "Setting other options, such as the default command, or locking after 30 minutes of inactivity:",
            "set-option -g default-command \"exec /bin/ksh\"",
            "set-option -g lock-after-time 1800",
            "Creating new key bindings:",
            "bind-key b set-option status",
            "bind-key / command-prompt \"split-window 'exec man %%'\"",
            "bind-key S command-prompt \"new-window -n %1 'ssh %1'\""
        ],
        "see_also": [
            {
                "name": "pty",
                "section": "4",
                "url": "https://www.chedong.com/phpMan.php/man/pty/4/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 27,
                "subsections": [
                    {
                        "name": "-2 -T",
                        "lines": 2,
                        "flag": "-T"
                    },
                    {
                        "name": "-C -CC",
                        "lines": 2,
                        "flag": "-C"
                    },
                    {
                        "name": "-c",
                        "lines": 4,
                        "flag": "-c"
                    },
                    {
                        "name": "-D",
                        "lines": 2,
                        "flag": "-D"
                    },
                    {
                        "name": "-f",
                        "lines": 11,
                        "flag": "-f"
                    },
                    {
                        "name": "-L",
                        "lines": 12,
                        "flag": "-L"
                    },
                    {
                        "name": "-l",
                        "lines": 2,
                        "flag": "-l"
                    },
                    {
                        "name": "-N",
                        "lines": 2,
                        "flag": "-N"
                    },
                    {
                        "name": "-S",
                        "lines": 3,
                        "flag": "-S"
                    },
                    {
                        "name": "-u",
                        "lines": 3,
                        "flag": "-u"
                    },
                    {
                        "name": "-T",
                        "lines": 2,
                        "flag": "-T"
                    },
                    {
                        "name": "-v",
                        "lines": 8,
                        "flag": "-v"
                    },
                    {
                        "name": "-V",
                        "lines": 5,
                        "flag": "-V"
                    }
                ]
            },
            {
                "name": "DEFAULT KEY BINDINGS",
                "lines": 69,
                "subsections": []
            },
            {
                "name": "COMMAND PARSING AND EXECUTION",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "PARSING SYNTAX",
                "lines": 129,
                "subsections": []
            },
            {
                "name": "COMMANDS",
                "lines": 49,
                "subsections": [
                    {
                        "name": "Token              Meaning",
                        "lines": 11
                    },
                    {
                        "name": "Token                  Meaning",
                        "lines": 79
                    }
                ]
            },
            {
                "name": "CLIENTS AND SESSIONS",
                "lines": 67,
                "subsections": [
                    {
                        "name": "kill-server",
                        "lines": 131
                    },
                    {
                        "name": "start-server",
                        "lines": 32
                    }
                ]
            },
            {
                "name": "WINDOWS AND PANES",
                "lines": 111,
                "subsections": [
                    {
                        "name": "-i",
                        "lines": 45,
                        "flag": "-i"
                    },
                    {
                        "name": "even-horizontal",
                        "lines": 2
                    },
                    {
                        "name": "even-vertical",
                        "lines": 2
                    },
                    {
                        "name": "main-horizontal",
                        "lines": 4
                    },
                    {
                        "name": "main-vertical",
                        "lines": 438
                    }
                ]
            },
            {
                "name": "KEY BINDINGS",
                "lines": 68,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 626,
                "subsections": []
            },
            {
                "name": "HOOKS",
                "lines": 72,
                "subsections": []
            },
            {
                "name": "MOUSE SUPPORT",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "FORMATS",
                "lines": 89,
                "subsections": [
                    {
                        "name": "Variable name          Alias    Replaced with",
                        "lines": 179
                    }
                ]
            },
            {
                "name": "STYLES",
                "lines": 8,
                "subsections": [
                    {
                        "name": "fg=colour",
                        "lines": 6
                    },
                    {
                        "name": "bg=colour",
                        "lines": 13
                    },
                    {
                        "name": "fill=colour",
                        "lines": 26
                    }
                ]
            },
            {
                "name": "NAMES AND TITLES",
                "lines": 27,
                "subsections": []
            },
            {
                "name": "GLOBAL AND SESSION ENVIRONMENT",
                "lines": 31,
                "subsections": []
            },
            {
                "name": "STATUS LINE",
                "lines": 181,
                "subsections": []
            },
            {
                "name": "BUFFERS",
                "lines": 102,
                "subsections": []
            },
            {
                "name": "MISCELLANEOUS",
                "lines": 15,
                "subsections": [
                    {
                        "name": "lock-server",
                        "lines": 20
                    }
                ]
            },
            {
                "name": "EXIT MESSAGES",
                "lines": 26,
                "subsections": []
            },
            {
                "name": "TERMINFO EXTENSIONS",
                "lines": 64,
                "subsections": []
            },
            {
                "name": "CONTROL MODE",
                "lines": 64,
                "subsections": [
                    {
                        "name": "%sessions-changed",
                        "lines": 22
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 34,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 53,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}