3 .\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
14 .\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
15 .\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: March 25 2013 $
22 .Nd terminal multiplexer
27 .Op Fl c Ar shell-command
29 .Op Fl L Ar socket-name
30 .Op Fl S Ar socket-path
31 .Op Ar command Op Ar flags
35 is a terminal multiplexer:
36 it enables a number of terminals to be created, accessed, and
37 controlled from a single screen.
39 may be detached from a screen
40 and continue running in the background,
41 then later reattached.
45 is started it creates a new
49 and displays it on screen.
50 A status line at the bottom of the screen
51 shows information on the current session
52 and is used to enter interactive commands.
54 A session is a single collection of
56 under the management of
58 Each session has one or more
60 A window occupies the entire screen
61 and may be split into rectangular panes,
62 each of which is a separate pseudo terminal
65 manual page documents the technical details of pseudo terminals).
68 instances may connect to the same session,
69 and any number of windows may be present in the same session.
70 Once all sessions are killed,
74 Each session is persistent and will survive accidental disconnection
77 connection timeout) or intentional detaching (with the
81 may be reattached using:
87 a session is displayed on screen by a
89 and all sessions are managed by a single
91 The server and each client are separate processes which communicate through a
95 The options are as follows:
96 .Bl -tag -width "XXXXXXXXXXXX"
100 to assume the terminal supports 256 colours.
102 Start in control mode (see the
108 .It Fl c Ar shell-command
111 using the default shell.
114 server will be started to retrieve the
117 This option is for compatibility with
121 is used as a login shell.
123 Specify an alternative configuration file.
126 loads the system configuration file from
127 .Pa @SYSCONFDIR@/tmux.conf ,
128 if present, then looks for a user configuration file at
131 The configuration file is a set of
133 commands which are executed in sequence when the server is first started.
135 loads configuration files once when the server process has started.
138 command may be used to load a file later.
141 shows any error messages from commands in configuration files in the first
142 session created, and continues to process the rest of the configuration file.
143 .It Fl L Ar socket-name
145 stores the server socket in a directory under
151 The default socket is named
153 This option allows a different socket name to be specified, allowing several
159 a full path is not necessary: the sockets are all created in the same
162 If the socket is accidentally removed, the
164 signal may be sent to the
166 server process to recreate it.
168 Behave as a login shell.
169 This flag currently has no effect and is for compatibility with other shells
170 when using tmux as a login shell.
174 server option to prevent the server sending various informational messages.
175 .It Fl S Ar socket-path
176 Specify a full alternative path to the server socket.
179 is specified, the default socket directory is not used and any
184 attempts to guess if the terminal is likely to support UTF-8 by checking the
190 environment variables to be set for the string "UTF-8".
191 This is not always correct: the
193 flag explicitly informs
195 that UTF-8 is supported.
197 If the server is started from a client passed
199 or where UTF-8 is detected, the
203 options are enabled in the global window and session options respectively.
205 Request verbose logging.
206 This option may be specified multiple times for increasing verbosity.
207 Log messages will be saved into
208 .Pa tmux-client-PID.log
210 .Pa tmux-server-PID.log
211 files in the current directory, where
213 is the PID of the server or client process.
218 .It Ar command Op Ar flags
219 This specifies one of a set of commands used to control
221 as described in the following sections.
222 If no commands are specified, the
228 may be controlled from an attached client by using a key combination of a
231 (Ctrl-b) by default, followed by a command key.
233 The default command key bindings are:
235 .Bl -tag -width "XXXXXXXXXX" -offset indent -compact
237 Send the prefix key (C-b) through to the application.
239 Rotate the panes in the current window forwards.
245 Break the current pane out of the window.
247 Split the current pane into two, top and bottom.
249 List all paste buffers.
251 Rename the current session.
253 Split the current pane into two, left and right.
255 Kill the current window.
257 Prompt for a window index to select.
259 Rename the current window.
261 Delete the most recently copied buffer of text.
263 Prompt for an index to move the current window.
265 Select windows 0 to 9.
271 Move to the previously active pane.
273 Choose which buffer to paste interactively from a list.
275 List all key bindings.
277 Choose a client to detach.
279 Enter copy mode to copy text or view the history.
281 Paste the most recently copied buffer of text.
285 Detach the current client.
287 Prompt to search for text in open windows.
289 Display some information about the current window.
291 Move to the previously selected window.
293 Change to the next window.
295 Select the next pane in the current window.
297 Change to the previous window.
299 Briefly display pane indexes.
301 Force redraw of the attached client.
303 Select a new session for the attached client interactively.
305 Switch the attached client back to the last session.
309 Choose the current window interactively.
311 Kill the current pane.
313 Swap the current pane with the previous pane.
315 Swap the current pane with the next pane.
317 Show previous messages from
321 Enter copy mode and scroll one page up.
324 Change to the pane above, below, to the left, or to the right of the current
327 Arrange panes in one of the five preset layouts: even-horizontal,
328 even-vertical, main-horizontal, main-vertical, or tiled.
330 Move to the next window with a bell or activity marker.
332 Rotate the panes in the current window backwards.
334 Move to the previous window with a bell or activity marker.
337 Resize the current pane in steps of one cell.
340 Resize the current pane in steps of five cells.
343 Key bindings may be changed with the
349 This section contains a list of the commands supported by
351 Most commands accept the optional
359 These specify the client, session, window or pane which a command should affect.
363 file to which the client is connected, for example either of
367 for the client attached to
369 If no client is specified, the current client is chosen, if possible, or an
371 Clients may be listed with the
376 is the session id prefixed with a $, the name of a session (as listed by the
378 command), or the name of a client with the same syntax as
380 in which case the session attached to the client is used.
381 When looking for the session name,
383 initially searches for an exact match; if none is found, the session names
384 are checked for any for which
386 is a prefix or for which it matches as an
389 If a single match is found, it is used as the target session; multiple matches
391 If a session is omitted, the current session is used if available; if no
392 current session is available, the most recently used is chosen.
395 specifies a window in the form
396 .Em session Ns \&: Ns Em window .
398 follows the same rules as for
402 is looked for in order: as a window index, for example mysession:1;
403 as a window ID, such as @1;
404 as an exact window name, such as mysession:mywindow; then as an
406 pattern or the start of a window name, such as mysession:mywin* or
408 An empty window name specifies the next unused index if appropriate (for
414 otherwise the current window in
417 The special character
419 uses the last (previously current) window,
421 selects the highest numbered window,
423 selects the lowest numbered window, and
427 select the next window or the previous window by number.
428 When the argument does not contain a colon,
430 first attempts to parse it as window; if that fails, an attempt is made to
434 takes a similar form to
436 but with the optional addition of a period followed by a pane index, for
437 example: mysession:mywindow.1.
438 If the pane index is omitted, the currently active pane in the specified
440 If neither a colon nor period appears,
442 first attempts to use the argument as a pane index; if that fails, it is looked
449 indicate the next or previous pane index, respectively.
460 may be used instead of a pane index.
462 The special characters
466 may be followed by an offset, for example:
467 .Bd -literal -offset indent
471 When dealing with a session that doesn't contain sequential window indexes,
472 they will be correctly skipped.
475 also gives each pane created in a server an identifier consisting of a
477 and a number, starting from zero.
478 A pane's identifier is unique for the life of the
480 server and is passed to the child process of the pane in the
482 environment variable.
483 It may be used alone to target a pane or the window containing it.
489 These must be passed as a single item, which typically means quoting them, for
491 .Bd -literal -offset indent
492 new-window 'vi /etc/passwd'
499 command, passed with the command and arguments separately, for example:
500 .Bd -literal -offset indent
501 bind-key F1 set-window-option force-width 81
506 .Bd -literal -offset indent
507 $ tmux bind-key F1 set-window-option force-width 81
510 Multiple commands may be specified together as part of a
511 .Em command sequence .
512 Each command should be separated by spaces and a semicolon;
513 commands are executed sequentially from left to right and
514 lines ending with a backslash continue on to the next line,
515 except when escaped by another backslash.
516 A literal semicolon may be included by escaping it with a backslash (for
517 example, when specifying a command sequence to
523 .Bd -literal -offset indent
524 refresh-client -t/dev/ttyp2
526 rename-session -tfirst newname
528 set-window-option -t:0 monitor-activity on
530 new-window ; split-window -d
532 bind-key R source-file ~/.tmux.conf \e; \e
533 display-message "source-file done"
538 .Bd -literal -offset indent
539 $ tmux kill-window -t :1
541 $ tmux new-window \e; split-window -d
543 $ tmux new-session -d 'vi /etc/passwd' \e; split-window -d \e; attach
545 .Sh CLIENTS AND SESSIONS
548 server manages clients, sessions, windows and panes.
549 Clients are attached to sessions to interact with them, either
550 when they are created with the
552 command, or later with the
555 Each session has one or more windows
558 Windows may be linked to multiple sessions and are made up of one or
560 each of which contains a pseudo terminal.
561 Commands for creating, linking and otherwise manipulating windows
564 .Sx WINDOWS AND PANES
567 The following commands are available to manage clients and sessions:
569 .It Xo Ic attach-session
571 .Op Fl c Ar working-directory
572 .Op Fl t Ar target-session
574 .D1 (alias: Ic attach )
577 create a new client in the current terminal and attach it to
579 If used from inside, switch the current client.
582 is specified, any other clients attached to the session are detached.
584 signifies the client is read-only (only keys bound to the
588 commands have any effect)
590 If no server is started,
592 will attempt to start it; this will fail unless sessions are created in the
599 are slightly adjusted: if
601 needs to select the most recently used session, it will prefer the most
607 will set the session working directory (used for new windows) to
608 .Ar working-directory .
609 .It Xo Ic detach-client
612 .Op Fl s Ar target-session
613 .Op Fl t Ar target-client
615 .D1 (alias: Ic detach )
616 Detach the current client if bound to a key, the client specified with
618 or all clients currently attached to the session specified by
622 option kills all but the client given with
626 is given, send SIGHUP to the parent process of the client, typically causing it
628 .It Ic has-session Op Fl t Ar target-session
630 Report an error and exit with 1 if the specified session does not exist.
631 If it does exist, exit with 0.
635 server and clients and destroy all sessions.
636 .It Xo Ic kill-session
638 .Op Fl t Ar target-session
640 Destroy the given session, closing any windows linked to it and no other
641 sessions, and detaching all clients attached to it.
644 is given, all sessions but the specified one is killed.
645 .It Xo Ic list-clients
647 .Op Fl t Ar target-session
650 List all clients attached to the server.
651 For the meaning of the
658 is specified, list only clients connected to that session.
660 .D1 (alias: Ic lscm )
661 List the syntax of all commands supported by
663 .It Ic list-sessions Op Fl F Ar format
665 List all sessions managed by the server.
666 For the meaning of the
671 .It Ic lock-client Op Fl t Ar target-client
672 .D1 (alias: Ic lockc )
678 .It Ic lock-session Op Fl t Ar target-session
679 .D1 (alias: Ic locks )
680 Lock all clients attached to
682 .It Xo Ic new-session
684 .Op Fl c Ar start-directory
686 .Op Fl n Ar window-name
687 .Op Fl s Ar session-name
688 .Op Fl t Ar target-session
694 Create a new session with name
697 The new session is attached to the current terminal unless
703 are the name of and shell command to execute in the initial window.
710 specify the size of the initial window (80 by 24 if not given).
712 If run from a terminal, any
714 special characters are saved and used for new windows in the new session.
724 already exists; in the case,
733 is given, the new session is
737 This means they share the same set of windows - all windows from
739 are linked to the new session and any subsequent new windows or windows being
740 closed are applied to both sessions.
741 The current and previous window and any session options remain independent and
742 either session may be killed without affecting the other.
753 option prints information about the new session after it has been created.
754 By default, it uses the format
756 but a different format may be specified with
758 .It Xo Ic refresh-client
760 .Op Fl t Ar target-client
762 .D1 (alias: Ic refresh )
763 Refresh the current client if bound to a key, or a single client if one is given
768 is specified, only update the client's status bar.
769 .It Xo Ic rename-session
770 .Op Fl t Ar target-session
773 .D1 (alias: Ic rename )
774 Rename the session to
776 .It Xo Ic show-messages
778 .Op Fl t Ar target-client
780 .D1 (alias: Ic showmsgs )
781 Show client messages or server information.
782 Any messages displayed on the status line are saved in a per-client message
783 log, up to a maximum of the limit set by the
785 session option for the session attached to that client.
794 show debugging information about the running server, jobs and terminals.
795 .It Ic source-file Ar path
796 .D1 (alias: Ic source )
797 Execute commands from
800 .D1 (alias: Ic start )
803 server, if not already running, without creating any sessions.
804 .It Xo Ic suspend-client
805 .Op Fl t Ar target-client
807 .D1 (alias: Ic suspendc )
808 Suspend a client by sending
811 .It Xo Ic switch-client
813 .Op Fl c Ar target-client
814 .Op Fl t Ar target-session
816 .D1 (alias: Ic switchc )
817 Switch the current session for client
826 is used, the client is moved to the last, next or previous session
829 toggles whether a client is read-only (see the
833 .Sh WINDOWS AND PANES
836 window may be in one of several modes.
837 The default permits direct access to the terminal attached to the window.
838 The other is copy mode, which permits a section of a window or its
839 history to be copied to a
841 for later insertion into another window.
842 This mode is entered with the
847 It is also entered when a command that produces output, such as
849 is executed from a key binding.
851 The keys available depend on whether emacs or vi mode is selected
855 The following keys are supported as appropriate for the mode:
856 .Bl -column "FunctionXXXXXXXXXXXXXXXXX" "viXXXXXXXXXX" "emacs" -offset indent
857 .It Sy "Function" Ta Sy "vi" Ta Sy "emacs"
858 .It Li "Back to indentation" Ta "^" Ta "M-m"
859 .It Li "Bottom of history" Ta "G" Ta "M-<"
860 .It Li "Clear selection" Ta "Escape" Ta "C-g"
861 .It Li "Copy selection" Ta "Enter" Ta "M-w"
862 .It Li "Cursor down" Ta "j" Ta "Down"
863 .It Li "Cursor left" Ta "h" Ta "Left"
864 .It Li "Cursor right" Ta "l" Ta "Right"
865 .It Li "Cursor to bottom line" Ta "L" Ta ""
866 .It Li "Cursor to middle line" Ta "M" Ta "M-r"
867 .It Li "Cursor to top line" Ta "H" Ta "M-R"
868 .It Li "Cursor up" Ta "k" Ta "Up"
869 .It Li "Delete entire line" Ta "d" Ta "C-u"
870 .It Li "Delete/Copy to end of line" Ta "D" Ta "C-k"
871 .It Li "End of line" Ta "$" Ta "C-e"
872 .It Li "Go to line" Ta ":" Ta "g"
873 .It Li "Half page down" Ta "C-d" Ta "M-Down"
874 .It Li "Half page up" Ta "C-u" Ta "M-Up"
875 .It Li "Jump forward" Ta "f" Ta "f"
876 .It Li "Jump to forward" Ta "t" Ta ""
877 .It Li "Jump backward" Ta "F" Ta "F"
878 .It Li "Jump to backward" Ta "T" Ta ""
879 .It Li "Jump again" Ta ";" Ta ";"
880 .It Li "Jump again in reverse" Ta "," Ta ","
881 .It Li "Next page" Ta "C-f" Ta "Page down"
882 .It Li "Next space" Ta "W" Ta ""
883 .It Li "Next space, end of word" Ta "E" Ta ""
884 .It Li "Next word" Ta "w" Ta ""
885 .It Li "Next word end" Ta "e" Ta "M-f"
886 .It Li "Other end of selection" Ta "o" Ta ""
887 .It Li "Paste buffer" Ta "p" Ta "C-y"
888 .It Li "Previous page" Ta "C-b" Ta "Page up"
889 .It Li "Previous word" Ta "b" Ta "M-b"
890 .It Li "Previous space" Ta "B" Ta ""
891 .It Li "Quit mode" Ta "q" Ta "Escape"
892 .It Li "Rectangle toggle" Ta "v" Ta "R"
893 .It Li "Scroll down" Ta "C-Down or C-e" Ta "C-Down"
894 .It Li "Scroll up" Ta "C-Up or C-y" Ta "C-Up"
895 .It Li "Search again" Ta "n" Ta "n"
896 .It Li "Search again in reverse" Ta "N" Ta "N"
897 .It Li "Search backward" Ta "?" Ta "C-r"
898 .It Li "Search forward" Ta "/" Ta "C-s"
899 .It Li "Start of line" Ta "0" Ta "C-a"
900 .It Li "Start selection" Ta "Space" Ta "C-Space"
901 .It Li "Top of history" Ta "g" Ta "M->"
902 .It Li "Transpose characters" Ta "" Ta "C-t"
905 The next and previous word keys use space and the
910 characters as word delimiters by default, but this can be adjusted by
914 Next word moves to the start of the next word, next word end to the end of the
915 next word and previous word to the start of the previous word.
916 The three next and previous space keys work similarly but use a space alone as
919 The jump commands enable quick movement within a line.
924 will move the cursor to the next
926 character on the current line.
929 will then jump to the next occurrence.
931 Commands in copy mode may be prefaced by an optional repeat count.
932 With vi key bindings, a prefix is entered using the number keys; with
933 emacs, the Alt (meta) key and a number begins prefix entry.
934 For example, to move the cursor forward by ten words, use
940 When copying the selection, the repeat count indicates the buffer index to
943 Mode key bindings are defined in a set of named tables:
947 for keys used when line editing at the command prompt;
951 for keys used when choosing from lists (such as produced by the
958 The tables may be viewed with the
960 command and keys modified or removed with
964 One command accepts an argument,
966 which copies the selection and pipes it to a command.
967 For example the following will bind
969 to copy the selection into
971 as well as the paste buffer:
972 .Bd -literal -offset indent
973 bind-key -temacs-copy C-q copy-pipe "cat >/tmp/out"
976 The paste buffer key pastes the first line from the top paste buffer on the
985 .Op Fl t Ar target-pane
990 option scrolls one page up.
993 Each window displayed by
995 may be split into one or more
997 each pane takes up a certain area of the display and is a separate terminal.
998 A window may be split into panes using the
1001 Windows may be split horizontally (with the
1003 flag) or vertically.
1004 Panes may be resized with the
1012 by default), the current pane may be changed with the
1018 commands may be used to swap panes without changing their position.
1019 Panes are numbered beginning from zero in the order they are created.
1024 These may be selected with the
1026 command or cycled with
1030 by default); once a layout is chosen, panes within it may be moved and resized
1033 The following layouts are supported:
1035 .It Ic even-horizontal
1036 Panes are spread out evenly from left to right across the window.
1037 .It Ic even-vertical
1038 Panes are spread evenly from top to bottom.
1039 .It Ic main-horizontal
1040 A large (main) pane is shown at the top of the window and the remaining panes
1041 are spread from left to right in the leftover space at the bottom.
1043 .Em main-pane-height
1044 window option to specify the height of the top pane.
1045 .It Ic main-vertical
1048 but the large pane is placed on the left and the others spread from top to
1049 bottom along the right.
1054 Panes are spread out as evenly as possible over the window in both rows and
1060 may be used to apply a previously used layout - the
1062 command displays the layout of each window in a form suitable for use with
1065 .Bd -literal -offset indent
1068 layout: bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1069 $ tmux select-layout bb62,159x48,0,0{79x48,0,0,79x48,80,0}
1073 automatically adjusts the size of the layout for the current window size.
1074 Note that a layout cannot be applied to a window with more panes than that
1075 from which the layout was originally defined.
1077 Commands related to windows and panes are as follows:
1079 .It Xo Ic break-pane
1082 .Op Fl t Ar target-pane
1084 .D1 (alias: Ic breakp )
1087 off from its containing window to make it the only pane in a new window.
1090 is given, the new window does not become the current window.
1093 option prints information about the new window after it has been created.
1094 By default, it uses the format
1095 .Ql #{session_name}:#{window_index}
1096 but a different format may be specified with
1098 .It Xo Ic capture-pane
1100 .Op Fl b Ar buffer-index
1101 .Op Fl E Ar end-line
1102 .Op Fl S Ar start-line
1103 .Op Fl t Ar target-pane
1105 .D1 (alias: Ic capturep )
1106 Capture the contents of a pane.
1109 is given, the output goes to stdout, otherwise to the buffer specified with
1111 or a new buffer if omitted.
1114 is given, the alternate screen is used, and the history is not accessible.
1115 If no alternate screen exists, an error will be returned unless
1120 is given, the output includes escape sequences for text and background
1123 also escapes non-printable characters as octal \exxx.
1125 joins wrapped lines and preserves trailing spaces at each line's end.
1127 captures only any output that the pane has received that is the beginning of an
1128 as-yet incomplete escape sequence.
1133 specify the starting and ending line numbers, zero is the first line of the
1134 visible pane and negative numbers are lines in the history.
1135 The default is to capture only the visible contents of the pane.
1139 .Op Fl t Ar target-window
1142 Put a window into client choice mode, allowing a client to be selected
1143 interactively from a list.
1144 After a client is chosen,
1146 is replaced by the client
1150 and the result executed as a command.
1153 is not given, "detach-client -t '%%'" is used.
1154 For the meaning of the
1159 This command works only if at least one client is attached.
1163 .Op Fl t Ar target-window
1166 Put a window into list choice mode, allowing
1170 can be a comma-separated list to display more than one item.
1171 If an item has spaces, that entry must be quoted.
1172 After an item is chosen,
1174 is replaced by the chosen item in the
1176 and the result is executed as a command.
1179 is not given, "run-shell '%%'" is used.
1181 also accepts format specifiers.
1182 For the meaning of this see the
1185 This command works only if at least one client is attached.
1189 .Op Fl t Ar target-window
1192 Put a window into session choice mode, where a session may be selected
1193 interactively from a list.
1196 is replaced by the session name in
1198 and the result executed as a command.
1201 is not given, "switch-client -t '%%'" is used.
1202 For the meaning of the
1207 This command works only if at least one client is attached.
1211 .Op Fl b Ar session-template
1212 .Op Fl c Ar window-template
1215 .Op Fl t Ar target-window
1217 Put a window into tree choice mode, where either sessions or windows may be
1218 selected interactively from a list.
1219 By default, windows belonging to a session are indented to show their
1220 relationship to a session.
1226 commands are wrappers around
1231 is given, will show sessions.
1234 is given, will show windows.
1236 By default, the tree is collapsed and sessions must be expanded to windows
1237 with the right arrow key.
1240 option will start with all sessions expanded instead.
1244 is given, will override the default session command.
1247 can be used and will be replaced with the session name.
1248 The default option if not specified is "switch-client -t '%%'".
1251 is given, will override the default window command.
1255 can be used and will be replaced with the session name and window index.
1256 When a window is chosen from the list, the session command is run before the
1261 is given will display the specified format instead of the default session
1265 is given will display the specified format instead of the default window
1267 For the meaning of the
1275 This command works only if at least one client is attached.
1279 .Op Fl t Ar target-window
1282 Put a window into window choice mode, where a window may be chosen
1283 interactively from a list.
1284 After a window is selected,
1286 is replaced by the session name and window index in
1288 and the result executed as a command.
1291 is not given, "select-window -t '%%'" is used.
1292 For the meaning of the
1297 This command works only if at least one client is attached.
1298 .It Ic display-panes Op Fl t Ar target-client
1299 .D1 (alias: Ic displayp)
1300 Display a visible indicator of each pane shown by
1303 .Ic display-panes-time ,
1304 .Ic display-panes-colour ,
1306 .Ic display-panes-active-colour
1308 While the indicator is on screen, a pane may be selected with the
1313 .It Xo Ic find-window
1316 .Op Fl t Ar target-window
1319 .D1 (alias: Ic findw )
1324 in window names, titles, and visible content (but not history).
1325 The flags control matching behavior:
1327 matches only visible window contents,
1329 matches only the window name and
1331 matches only the window title.
1334 If only one window is matched, it'll be automatically selected,
1335 otherwise a choice list is shown.
1336 For the meaning of the
1341 This command works only if at least one client is attached.
1346 .Fl p Ar percentage Oc
1347 .Op Fl s Ar src-pane
1348 .Op Fl t Ar dst-pane
1350 .D1 (alias: Ic joinp )
1353 but instead of splitting
1355 and creating a new pane, split it and move
1358 This can be used to reverse
1364 to be joined to left of or above
1368 .Op Fl t Ar target-pane
1370 .D1 (alias: Ic killp )
1371 Destroy the given pane.
1372 If no panes remain in the containing window, it is also destroyed.
1375 option kills all but the pane given with
1377 .It Xo Ic kill-window
1379 .Op Fl t Ar target-window
1381 .D1 (alias: Ic killw )
1382 Kill the current window or the window at
1384 removing it from any sessions to which it is linked.
1387 option kills all but the window given with
1389 .It Ic last-pane Op Fl t Ar target-window
1390 .D1 (alias: Ic lastp )
1391 Select the last (previously selected) pane.
1392 .It Ic last-window Op Fl t Ar target-session
1393 .D1 (alias: Ic last )
1394 Select the last (previously selected) window.
1397 is specified, select the last window of the current session.
1398 .It Xo Ic link-window
1400 .Op Fl s Ar src-window
1401 .Op Fl t Ar dst-window
1403 .D1 (alias: Ic linkw )
1410 is specified and no such window exists, the
1417 exists, it is killed, otherwise an error is generated.
1420 is given, the newly linked window is not selected.
1421 .It Xo Ic list-panes
1426 .D1 (alias: Ic lsp )
1431 is ignored and all panes on the server are listed.
1436 is a session (or the current session).
1437 If neither is given,
1439 is a window (or the current window).
1440 For the meaning of the
1445 .It Xo Ic list-windows
1448 .Op Fl t Ar target-session
1450 .D1 (alias: Ic lsw )
1453 is given, list all windows on the server.
1454 Otherwise, list windows in the current session or in
1455 .Ar target-session .
1456 For the meaning of the
1465 .Fl p Ar percentage Oc
1466 .Op Fl s Ar src-pane
1467 .Op Fl t Ar dst-pane
1469 .D1 (alias: Ic movep )
1476 may belong to the same window.
1477 .It Xo Ic move-window
1479 .Op Fl s Ar src-window
1480 .Op Fl t Ar dst-window
1482 .D1 (alias: Ic movew )
1485 except the window at
1491 all windows in the session are renumbered in sequential order, respecting
1495 .It Xo Ic new-window
1497 .Op Fl c Ar start-directory
1499 .Op Fl n Ar window-name
1500 .Op Fl t Ar target-window
1501 .Op Ar shell-command
1503 .D1 (alias: Ic neww )
1504 Create a new window.
1507 the new window is inserted at the next index up from the specified
1509 moving windows up if necessary,
1512 is the new window location.
1516 is given, the session does not make the new window the current window.
1518 represents the window to be created; if the target already exists an error is
1521 flag is used, in which case it is destroyed.
1523 is the command to execute.
1526 is not specified, the value of the
1530 specifies the working directory in which the new window is created.
1532 When the shell command completes, the window closes.
1535 option to change this behaviour.
1539 environment variable must be set to
1541 for all programs running
1544 New windows will automatically have
1546 added to their environment, but care must be taken not to reset this in shell
1551 option prints information about the new window after it has been created.
1552 By default, it uses the format
1553 .Ql #{session_name}:#{window_index}
1554 but a different format may be specified with
1556 .It Ic next-layout Op Fl t Ar target-window
1557 .D1 (alias: Ic nextl )
1558 Move a window to the next layout and rearrange the panes to fit.
1559 .It Xo Ic next-window
1561 .Op Fl t Ar target-session
1563 .D1 (alias: Ic next )
1564 Move to the next window in the session.
1567 is used, move to the next window with an alert.
1570 .Op Fl t Ar target-pane
1571 .Op Ar shell-command
1573 .D1 (alias: Ic pipep )
1574 Pipe any output sent by the program in
1577 A pane may only be piped to one command at a time, any existing pipe is
1583 string may contain the special character sequences supported by the
1588 is given, the current pipe (if any) is closed.
1592 option only opens a new pipe if no previous pipe exists, allowing a pipe to
1593 be toggled with a single key, for example:
1594 .Bd -literal -offset indent
1595 bind-key C-p pipe-pane -o 'cat >>~/output.#I-#P'
1597 .It Xo Ic previous-layout
1598 .Op Fl t Ar target-window
1600 .D1 (alias: Ic prevl )
1601 Move to the previous layout in the session.
1602 .It Xo Ic previous-window
1604 .Op Fl t Ar target-session
1606 .D1 (alias: Ic prev )
1607 Move to the previous window in the session.
1610 move to the previous window with an alert.
1611 .It Xo Ic rename-window
1612 .Op Fl t Ar target-window
1615 .D1 (alias: Ic renamew )
1616 Rename the current window, or the window at
1620 .It Xo Ic resize-pane
1622 .Op Fl t Ar target-pane
1627 .D1 (alias: Ic resizep )
1628 Resize a pane, up, down, left or right by
1644 is given in lines or cells (the default is 1).
1648 the active pane is toggled between zoomed (occupying the whole of the window)
1649 and unzoomed (its normal position in the layout).
1650 .It Xo Ic respawn-pane
1652 .Op Fl t Ar target-pane
1653 .Op Ar shell-command
1655 .D1 (alias: Ic respawnp )
1656 Reactivate a pane in which the command has exited (see the
1661 is not given, the command used when the pane was created is executed.
1662 The pane must be already inactive, unless
1664 is given, in which case any existing command is killed.
1665 .It Xo Ic respawn-window
1667 .Op Fl t Ar target-window
1668 .Op Ar shell-command
1670 .D1 (alias: Ic respawnw )
1671 Reactivate a window in which the command has exited (see the
1676 is not given, the command used when the window was created is executed.
1677 The window must be already inactive, unless
1679 is given, in which case any existing command is killed.
1680 .It Xo Ic rotate-window
1682 .Op Fl t Ar target-window
1684 .D1 (alias: Ic rotatew )
1685 Rotate the positions of the panes within a window, either upward (numerically
1688 or downward (numerically higher).
1689 .It Xo Ic select-layout
1691 .Op Fl t Ar target-window
1694 .D1 (alias: Ic selectl )
1695 Choose a specific layout for a window.
1698 is not given, the last preset layout used (if any) is reapplied.
1702 are equivalent to the
1707 .It Xo Ic select-pane
1709 .Op Fl t Ar target-pane
1711 .D1 (alias: Ic selectp )
1714 the active pane in window
1722 is used, respectively the pane below, to the left, to the right, or above the
1723 target pane is used.
1725 is the same as using the
1728 .It Xo Ic select-window
1730 .Op Fl t Ar target-window
1732 .D1 (alias: Ic selectw )
1733 Select the window at
1739 are equivalent to the
1747 is given and the selected window is already the current window,
1748 the command behaves like
1750 .It Xo Ic split-window
1752 .Op Fl c Ar start-directory
1755 .Fl p Ar percentage Oc
1756 .Op Fl t Ar target-pane
1757 .Op Ar shell-command
1760 .D1 (alias: Ic splitw )
1761 Create a new pane by splitting
1764 does a horizontal split and
1766 a vertical split; if neither is specified,
1773 options specify the size of the new pane in lines (for vertical split) or in
1774 cells (for horizontal split), or as a percentage, respectively.
1775 All other options have the same meaning as for the
1780 .Op Fl s Ar src-pane
1781 .Op Fl t Ar dst-pane
1783 .D1 (alias: Ic swapp )
1787 is used and no source pane is specified with
1790 is swapped with the previous pane (before it numerically);
1792 swaps with the next pane (after it numerically).
1796 not to change the active pane.
1797 .It Xo Ic swap-window
1799 .Op Fl s Ar src-window
1800 .Op Fl t Ar dst-window
1802 .D1 (alias: Ic swapw )
1805 except the source and destination windows are swapped.
1806 It is an error if no window exists at
1808 .It Xo Ic unlink-window
1810 .Op Fl t Ar target-window
1812 .D1 (alias: Ic unlinkw )
1817 is given, a window may be unlinked only if it is linked to multiple sessions -
1818 windows may not be linked to no sessions;
1821 is specified and the window is linked to only one session, it is unlinked and
1826 allows a command to be bound to most keys, with or without a prefix key.
1827 When specifying keys, most represent themselves (for example
1831 Ctrl keys may be prefixed with
1837 In addition, the following special key names are accepted:
1855 .Em NPage/PageDown/PgDn ,
1856 .Em PPage/PageUp/PgUp ,
1860 Note that to bind the
1864 keys, quotation marks are necessary, for example:
1865 .Bd -literal -offset indent
1866 bind-key '"' split-window
1867 bind-key "'" new-window
1870 Commands related to key bindings are as follows:
1874 .Op Fl t Ar key-table
1875 .Ar key Ar command Op Ar arguments
1877 .D1 (alias: Ic bind )
1884 the primary key bindings are modified (those normally activated with the prefix
1885 key); in this case, if
1887 is specified, it is not necessary to use the prefix key,
1894 flag indicates this key may repeat, see the
1904 the binding for command mode with
1906 or for normal mode without.
1907 To view the default bindings and possible commands, see the
1910 .It Ic list-keys Op Fl t Ar key-table
1911 .D1 (alias: Ic lsk )
1912 List all key bindings.
1915 the primary key bindings - those executed when preceded by the prefix key -
1922 are listed; this may be one of:
1932 .Op Fl t Ar target-pane
1935 .D1 (alias: Ic send )
1936 Send a key or keys to a window.
1939 is the name of the key (such as
1943 ) to send; if the string is not recognised as a key, it is sent as a series of
1947 flag disables key name lookup and sends the keys literally.
1948 All arguments are sent sequentially from first to last.
1951 flag causes the terminal state to be reset.
1952 .It Xo Ic send-prefix
1954 .Op Fl t Ar target-pane
1956 Send the prefix key, or with
1958 the secondary prefix key, to a window as if it was pressed.
1959 .It Xo Ic unbind-key
1961 .Op Fl t Ar key-table
1964 .D1 (alias: Ic unbind )
1965 Unbind the command bound to
1969 the primary key bindings are modified; in this case, if
1971 is specified, the command bound to
1973 without a prefix (if any) is removed.
1976 is present, all key bindings are removed.
1984 is unbound: the binding for command mode with
1986 or for normal mode without.
1989 The appearance and behaviour of
1991 may be modified by changing the value of various options.
1992 There are three types of option:
1993 .Em server options ,
1996 .Em window options .
2000 server has a set of global options which do not apply to any particular
2002 These are altered with the
2005 command, or displayed with the
2010 In addition, each individual session may have a set of session options, and
2011 there is a separate set of global session options.
2012 Sessions which do not have a particular option configured inherit the value
2013 from the global session options.
2014 Session options are set or unset with the
2016 command and may be listed with the
2019 The available server and session options are listed under the
2023 Similarly, a set of window options is attached to each window, and there is
2024 a set of global window options from which any unset options are inherited.
2025 Window options are altered with the
2026 .Ic set-window-option
2027 command and can be listed with the
2028 .Ic show-window-options
2030 All window options are documented with the
2031 .Ic set-window-option
2035 also supports user options which are prefixed with a
2037 User options may have any name, so long as they are prefixed with
2039 and be set to any string.
2041 .Bd -literal -offset indent
2042 $ tmux setw -q @foo "abc123"
2043 $ tmux showw -v @foo
2047 Commands which set options are as follows:
2049 .It Xo Ic set-option
2051 .Op Fl t Ar target-session | Ar target-window
2054 .D1 (alias: Ic set )
2055 Set a window option with
2058 .Ic set-window-option
2060 a server option with
2062 otherwise a session option.
2066 is specified, the global session or window option is set.
2069 flag unsets an option, so a session inherits the option from the global
2071 It is not possible to unset a global option.
2075 flag prevents setting an option that is already set.
2079 flag suppresses the informational message (as if the
2081 server option was set).
2085 and if the option expects a string or a style,
2087 is appended to the existing setting.
2089 .Bd -literal -offset indent
2090 set -g status-left "foo"
2091 set -ag status-left "bar"
2097 .Bd -literal -offset indent
2098 set -g status-style "bg=red"
2099 set -ag status-style "fg=blue"
2102 Will result in a red background
2107 the result would be the default background and a blue foreground.
2109 Available window options are listed under
2110 .Ic set-window-option .
2113 depends on the option and may be a number, a string, or a flag (on, off, or
2116 Available server options are:
2118 .It Ic buffer-limit Ar number
2119 Set the number of buffers; as new buffers are added to the top of the stack,
2120 old ones are removed from the bottom if necessary to maintain this maximum
2122 .It Ic escape-time Ar time
2123 Set the time in milliseconds for which
2125 waits after an escape is input to determine if it is part of a function or meta
2127 The default is 500 milliseconds.
2128 .It Xo Ic exit-unattached
2131 If enabled, the server will exit when there are no attached clients.
2132 .It Xo Ic focus-events
2135 When enabled, focus events are requested from the terminal if supported and
2136 passed through to applications running in
2138 Attached clients should be detached and attached again after changing this
2143 Enable or disable the display of various informational messages (see also the
2146 .It Xo Ic set-clipboard
2149 Attempt to set the terminal clipboard content using the
2153 This option is on by default if there is an
2157 description for the client terminal.
2158 Note that this feature needs to be enabled in
2160 by setting the resource:
2161 .Bd -literal -offset indent
2162 disallowedWindowOps: 20,21,SetXprop
2165 Or changing this property from the
2167 interactive menu when required.
2170 Available session options are:
2172 .It Ic assume-paste-time Ar milliseconds
2173 If keys are entered faster than one in
2175 they are assumed to have been pasted rather than typed and
2177 key bindings are not processed.
2178 The default is one millisecond and zero disables.
2179 .It Ic base-index Ar index
2180 Set the base index from which an unused index should be searched when a new
2182 The default is zero.
2183 .It Xo Ic bell-action
2184 .Op Ic any | none | current
2186 Set action on window bell.
2188 means a bell in any window linked to a session causes a bell in the current
2189 window of that session,
2191 means all bells are ignored and
2193 means only bells in windows other than the current window are ignored.
2194 .It Xo Ic bell-on-alert
2197 If on, ring the terminal bell when an alert
2199 .It Ic default-command Ar shell-command
2200 Set the command used for new windows (if not specified when the window is
2206 The default is an empty string, which instructs
2208 to create a login shell using the value of the
2211 .It Ic default-shell Ar path
2212 Specify the default shell.
2213 This is used as the login shell for new windows when the
2215 option is set to empty, and must be the full path of the executable.
2218 tries to set a default value from the first suitable of the
2220 environment variable, the shell returned by
2224 This option should be configured when
2226 is used as a login shell.
2227 .It Ic default-terminal Ar terminal
2228 Set the default terminal for new windows created in this session - the
2229 default value of the
2231 environment variable.
2234 to work correctly, this
2238 or a derivative of it.
2239 .It Xo Ic destroy-unattached
2242 If enabled and the session is no longer attached to any clients, it is
2244 .It Xo Ic detach-on-destroy
2247 If on (the default), the client is detached when the session it is attached to
2249 If off, the client is switched to the most recently active of the remaining
2251 .It Ic display-panes-active-colour Ar colour
2252 Set the colour used by the
2254 command to show the indicator for the active pane.
2255 .It Ic display-panes-colour Ar colour
2256 Set the colour used by the
2258 command to show the indicators for inactive panes.
2259 .It Ic display-panes-time Ar time
2260 Set the time in milliseconds for which the indicators shown by the
2263 .It Ic display-time Ar time
2264 Set the amount of time for which status line messages and other on-screen
2265 indicators are displayed.
2268 .It Ic history-limit Ar lines
2269 Set the maximum number of lines held in window history.
2270 This setting applies only to new windows - existing window histories are not
2271 resized and retain the limit at the point they were created.
2272 .It Ic lock-after-time Ar number
2273 Lock the session (like the
2277 seconds of inactivity, or the entire server (all sessions) if the
2280 The default is not to lock (set to 0).
2281 .It Ic lock-command Ar shell-command
2282 Command to run when locking each client.
2283 The default is to run
2287 .It Xo Ic lock-server
2293 instead of each session locking individually as each has been
2295 .Ic lock-after-time ,
2296 the entire server will lock after
2298 sessions would have locked.
2299 This has no effect as a session option; it must be set as a global option.
2300 .It Ic message-command-style Ar style
2301 Set status line message command style, where
2303 is a comma-separated list of characteristics to be specified.
2307 to set the background colour,
2309 to set the foreground colour, and a list of attributes as specified below.
2311 The colour is one of:
2320 aixterm bright variants (if supported:
2327 from the 256-colour set,
2329 or a hexadecimal RGB string such as
2331 which chooses the closest match from the default 256-colour set.
2333 The attributes is either
2335 or a comma-delimited list of one or more of:
2346 to turn an attribute on, or an attribute prefixed with
2351 .Bd -literal -offset indent
2352 fg=yellow,bold,underscore,blink
2353 bg=black,fg=default,noreverse
2360 command the new style is added otherwise the existing style is replaced.
2361 .It Ic message-limit Ar number
2362 Set the number of error or information messages to save in the message log for
2365 .It Ic message-style Ar style
2366 Set status line message style.
2370 .Ic message-command-style
2372 .It Xo Ic mouse-resize-pane
2377 captures the mouse and allows panes to be resized by dragging on their borders.
2378 .It Xo Ic mouse-select-pane
2383 captures the mouse and when a window is split into multiple panes the mouse may
2384 be used to select the current pane.
2385 The mouse click is also passed through to the application as normal.
2386 .It Xo Ic mouse-select-window
2389 If on, clicking the mouse on a window name in the status line will select that
2391 .It Xo Ic mouse-utf8
2394 If enabled, request mouse input as UTF-8 on UTF-8 terminals.
2395 .It Ic pane-active-border-style Ar style
2396 Set the pane border style for the currently active pane.
2400 .Ic message-command-style
2402 Attributes are ignored.
2403 .It Ic pane-border-style Ar style
2404 Set the pane border style for paneas aside from the active pane.
2408 .Ic message-command-style
2410 Attributes are ignored.
2411 .It Ic prefix Ar key
2412 Set the key accepted as a prefix key.
2413 .It Ic prefix2 Ar key
2414 Set a secondary key accepted as a prefix key.
2415 .It Xo Ic renumber-windows
2418 If on, when a window is closed in a session, automatically renumber the other
2419 windows in numerical order.
2422 option if it has been set.
2423 If off, do not renumber the windows.
2424 .It Ic repeat-time Ar time
2425 Allow multiple commands to be entered without pressing the prefix-key again
2428 milliseconds (the default is 500).
2429 Whether a key repeats may be set when it is bound using the
2433 Repeat is enabled for the default keys bound to the
2436 .It Xo Ic set-remain-on-exit
2441 window option for any windows first created in this session.
2442 When this option is true, windows in which the running program has
2443 exited do not close, instead remaining open but inactivate.
2446 command to reactivate such a window, or the
2448 command to destroy it.
2449 .It Xo Ic set-titles
2452 Attempt to set the client terminal title using the
2457 entries if they exist.
2459 automatically sets these to the \ee]2;...\e007 sequence if
2460 the terminal appears to be an xterm.
2461 This option is off by default.
2463 will only attempt to set the window title if the STY environment
2465 .It Ic set-titles-string Ar string
2466 String used to set the window title if
2469 Character sequences are replaced as for the
2475 Show or hide the status line.
2476 .It Ic status-interval Ar interval
2477 Update the status bar every
2480 By default, updates will occur every 15 seconds.
2481 A setting of zero disables redrawing at interval.
2482 .It Xo Ic status-justify
2483 .Op Ic left | centre | right
2485 Set the position of the window list component of the status line: left, centre
2487 .It Xo Ic status-keys
2490 Use vi or emacs-style
2491 key bindings in the status line, for example at the command prompt.
2492 The default is emacs, unless the
2496 environment variables are set and contain the string
2498 .It Ic status-left Ar string
2501 (by default the session name) to the left of the status bar.
2503 will be passed through
2508 It may also contain any of the following special character sequences:
2509 .Bl -column "Character pair" "Replaced with" -offset indent
2510 .It Sy "Character pair" Ta Sy "Replaced with"
2511 .It Li "#(shell-command)" Ta "First line of the command's output"
2512 .It Li "#[attributes]" Ta "Colour or attribute change"
2513 .It Li "##" Ta "A literal" Ql #
2516 The #(shell-command) form executes
2518 and inserts the first line of its output.
2519 Note that shell commands are only executed once at the interval specified by
2522 option: if the status line is redrawn in the meantime, the previous result is
2524 Shell commands are executed with the
2526 global environment set (see the
2530 For details on how the names and titles can be set see the
2531 .Sx "NAMES AND TITLES"
2533 For a list of allowed attributes see the
2534 .Ic message-command-style
2538 .Bd -literal -offset indent
2539 #(sysctl vm.loadavg)
2540 #[fg=yellow,bold]#(apm -l)%%#[default] [#S]
2543 Where appropriate, special character sequences may be prefixed with a number to
2544 specify the maximum length, for example
2547 By default, UTF-8 in
2549 is not interpreted, to enable UTF-8, use the
2552 .It Ic status-left-length Ar length
2555 of the left component of the status bar.
2557 .It Ic status-left-style Ar style
2558 Set the style of the left part of the status line.
2562 .Ic message-command-style
2564 .It Xo Ic status-position
2567 Set the position of the status line.
2568 .It Ic status-right Ar string
2571 to the right of the status bar.
2572 By default, the current window title in double quotes, the date and the time
2579 character pairs are replaced, and UTF-8 is dependent on the
2582 .It Ic status-right-length Ar length
2585 of the right component of the status bar.
2587 .It Ic status-right-style Ar style
2588 Set the style of the right part of the status line.
2592 .Ic message-command-style
2594 .It Ic status-style Ar style
2595 Set status line style.
2599 .Ic message-command-style
2601 .It Xo Ic status-utf8
2606 to treat top-bit-set characters in the
2610 strings as UTF-8; notably, this is important for wide characters.
2611 This option defaults to off.
2612 .It Ic terminal-overrides Ar string
2613 Contains a list of entries which override terminal descriptions read using
2616 is a comma-separated list of items each a colon-separated string made up of a
2617 terminal type pattern (matched using
2623 For example, to set the
2628 for all terminal types and the
2634 terminal type, the option could be set to the string:
2635 .Bd -literal -offset indent
2636 "*:clear=\ee[H\ee[2J,rxvt:dch1=\ee[P"
2639 The terminal entry value is passed through
2641 before interpretation.
2642 The default value forcibly corrects the
2644 entry for terminals which support 256 colours:
2645 .Bd -literal -offset indent
2646 "*256col*:colors=256,xterm*:XT"
2648 .It Ic update-environment Ar variables
2649 Set a space-separated string containing a list of environment variables to be
2650 copied into the session environment when a new session is created or an
2651 existing session is attached.
2652 Any variables that do not exist in the source environment are set to be
2653 removed from the session environment (as if
2659 "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID
2661 .It Xo Ic visual-activity
2664 If on, display a status line message when activity occurs in a window
2666 .Ic monitor-activity
2667 window option is enabled.
2668 .It Xo Ic visual-bell
2671 If this option is on, a message is shown on a bell instead of it being passed
2672 through to the terminal (which normally makes a sound).
2676 .It Xo Ic visual-content
2680 .Ic visual-activity ,
2681 display a message when content is present in a window
2684 window option is enabled.
2685 .It Xo Ic visual-silence
2690 is enabled, prints a message after the interval has expired on a given window.
2691 .It Ic word-separators Ar string
2692 Sets the session's conception of what characters are considered word
2693 separators, for the purposes of the next and previous word commands in
2698 .It Xo Ic set-window-option
2700 .Op Fl t Ar target-window
2703 .D1 (alias: Ic setw )
2704 Set a window option.
2712 flags work similarly to the
2716 Supported window options are:
2718 .Bl -tag -width Ds -compact
2719 .It Xo Ic aggressive-resize
2722 Aggressively resize the chosen window.
2725 will resize the window to the size of the smallest session for which it is the
2726 current window, rather than the smallest session to which it is attached.
2727 The window may resize when the current window is changed on another sessions;
2728 this option is good for full-screen programs which support
2730 and poor for interactive programs such as shells.
2732 .It Xo Ic allow-rename
2735 Allow programs to change the window name using a terminal escape
2736 sequence (\\033k...\\033\\\\).
2739 .It Xo Ic alternate-screen
2742 This option configures whether programs running inside
2744 may use the terminal alternate screen feature, which allows the
2750 The alternate screen feature preserves the contents of the window when an
2751 interactive application starts and restores it on exit, so that any output
2752 visible before the application starts reappears unchanged after it exits.
2755 .It Xo Ic automatic-rename
2758 Control automatic window renaming.
2759 When this setting is enabled,
2761 will rename the window automatically using the format specified by
2762 .Ic automatic-rename-format .
2763 This flag is automatically disabled for an individual window when a name
2764 is specified at creation with
2770 or with a terminal escape sequence.
2771 It may be switched off globally with:
2772 .Bd -literal -offset indent
2773 set-window-option -g automatic-rename off
2776 .It Ic automatic-rename-format Ar format
2780 .Ic automatic-rename
2783 .It Ic c0-change-interval Ar interval
2784 .It Ic c0-change-trigger Ar trigger
2785 These two options configure a simple form of rate limiting for a pane.
2790 C0 sequences that modify the screen (for example, carriage returns, linefeeds
2791 or backspaces) in one millisecond, it will stop updating the pane immediately and
2792 instead redraw it entirely every
2795 This helps to prevent fast output (such as
2797 overwhelming the terminal.
2798 The default is a trigger of 250 and an interval of 100.
2799 A trigger of zero disables the rate limiting.
2801 .It Ic clock-mode-colour Ar colour
2804 .It Xo Ic clock-mode-style
2807 Set clock hour format.
2809 .It Ic force-height Ar height
2810 .It Ic force-width Ar width
2813 from resizing a window to greater than
2817 A value of zero restores the default unlimited setting.
2819 .It Ic main-pane-height Ar height
2820 .It Ic main-pane-width Ar width
2821 Set the width or height of the main (left or top) pane in the
2830 Use vi or emacs-style key bindings in copy and choice modes.
2833 option, the default is emacs, unless
2840 .It Xo Ic mode-mouse
2841 .Op Ic on | off | copy-mode
2843 Mouse state in modes.
2844 If on, the mouse may be used to enter copy mode and copy a selection by
2845 dragging, to enter copy mode and scroll with the mouse wheel, or to select an
2846 option in choice mode.
2849 the mouse behaves as set to on, but cannot be used to enter copy
2852 .It Ic mode-style Ar style
2853 Set window modes style.
2857 .Ic message-command-style
2860 .It Xo Ic monitor-activity
2863 Monitor for activity in the window.
2864 Windows with activity are highlighted in the status line.
2866 .It Ic monitor-content Ar match-string
2867 Monitor content in the window.
2872 appears in the window, it is highlighted in the status line.
2874 .It Xo Ic monitor-silence
2877 Monitor for silence (no activity) in the window within
2880 Windows that have been silent for the interval are highlighted in the
2882 An interval of zero disables the monitoring.
2884 .It Ic other-pane-height Ar height
2885 Set the height of the other panes (not the main pane) in the
2888 If this option is set to 0 (the default), it will have no effect.
2890 .Ic main-pane-height
2892 .Ic other-pane-height
2893 options are set, the main pane will grow taller to make the other panes the
2894 specified height, but will never shrink to do so.
2896 .It Ic other-pane-width Ar width
2898 .Ic other-pane-height ,
2899 but set the width of other panes in the
2903 .It Ic pane-base-index Ar index
2906 but set the starting index for pane numbers.
2908 .It Xo Ic remain-on-exit
2911 A window with this flag set is not destroyed when the program running in it
2913 The window may be reactivated with the
2917 .It Xo Ic synchronize-panes
2920 Duplicate input to any pane to all other panes in the same window (only
2921 for panes that are not in any special mode).
2928 to expect UTF-8 sequences to appear in this window.
2930 .It Ic window-status-activity-style Ar style
2931 Set status line style for windows with an activity alert.
2935 .Ic message-command-style
2938 .It Ic window-status-bell-style Ar style
2939 Set status line style for windows with a bell alert.
2943 .Ic message-command-style
2946 .It Ic window-status-content-style Ar style
2947 Set status line style for windows with a content alert.
2951 .Ic message-command-style
2954 .It Ic window-status-current-format Ar string
2956 .Ar window-status-format ,
2957 but is the format used when the window is the current window.
2959 .It Ic window-status-current-style Ar style
2960 Set status line style for the currently active window.
2964 .Ic message-command-style
2967 .It Ic window-status-format Ar string
2968 Set the format in which the window is displayed in the status line window list.
2971 option for details of special character sequences available.
2975 .It Ic window-status-last-style Ar style
2976 Set status line style for the last active window.
2980 .Ic message-command-style
2983 .It Ic window-status-separator Ar string
2984 Sets the separator drawn between windows in the status line.
2985 The default is a single space character.
2987 .It Ic window-status-style Ar style
2988 Set status line style for a single window.
2992 .Ic message-command-style
2995 .It Xo Ic xterm-keys
2998 If this option is set,
3002 function key sequences; these have a number included to indicate modifiers such
3003 as Shift, Alt or Ctrl.
3006 .It Xo Ic wrap-search
3009 If this option is set, searches will wrap around the end of the pane contents.
3012 .It Xo Ic show-options
3014 .Op Fl t Ar target-session | Ar target-window
3017 .D1 (alias: Ic show )
3018 Show the window options (or a single window option if given) with
3021 .Ic show-window-options ) ,
3022 the server options with
3024 otherwise the session options for
3025 .Ar target session .
3026 Global session or window options are listed if
3030 shows only the option value, not the name.
3033 is set, no error will be returned if
3036 .It Xo Ic show-window-options
3038 .Op Fl t Ar target-window
3041 .D1 (alias: Ic showw )
3042 List the window options or a single option for
3044 or the global window options if
3048 shows only the option value, not the name.
3051 Certain commands accept the
3056 This is a string which controls the output format of the command.
3057 Replacement variables are enclosed in
3062 .Ql #{session_name} .
3063 Some variables also have an shorter alias such as
3066 is replaced by a single
3068 Conditionals are also accepted by prefixing with
3070 and separating two alternatives with a comma;
3071 if the specified variable exists and is not zero, the first alternative
3072 is chosen, otherwise the second is used.
3074 .Ql #{?session_attached,attached,not attached}
3075 will include the string
3077 if the session is attached and the string
3079 if it is unattached.
3080 A limit may be placed on the length of the resultant string by prefixing it
3083 a number and a colon, so
3084 .Ql #{=10:pane_title}
3085 will include at most the first 10 characters of the pane title.
3087 The following variables are available, where appropriate:
3088 .Bl -column "XXXXXXXXXXXXXXXXXXX" "XXXXX"
3089 .It Sy "Variable name" Ta Sy "Alias" Ta Sy "Replaced with"
3090 .It Li "alternate_on" Ta "" Ta "If pane is in alternate screen"
3091 .It Li "alternate_saved_x" Ta "" Ta "Saved cursor X in alternate screen"
3092 .It Li "alternate_saved_y" Ta "" Ta "Saved cursor Y in alternate screen"
3093 .It Li "buffer_sample" Ta "" Ta "First 50 characters from buffer"
3094 .It Li "buffer_size" Ta "" Ta "Size of the specified buffer in bytes"
3095 .It Li "client_activity" Ta "" Ta "Integer time client last had activity"
3096 .It Li "client_activity_string" Ta "" Ta "String time client last had activity"
3097 .It Li "client_created" Ta "" Ta "Integer time client created"
3098 .It Li "client_created_string" Ta "" Ta "String time client created"
3099 .It Li "client_height" Ta "" Ta "Height of client"
3100 .It Li "client_last_session" Ta "" Ta "Name of the client's last session"
3101 .It Li "client_prefix" Ta "" Ta "1 if prefix key has been pressed"
3102 .It Li "client_readonly" Ta "" Ta "1 if client is readonly"
3103 .It Li "client_session" Ta "" Ta "Name of the client's session"
3104 .It Li "client_termname" Ta "" Ta "Terminal name of client"
3105 .It Li "client_tty" Ta "" Ta "Pseudo terminal of client"
3106 .It Li "client_utf8" Ta "" Ta "1 if client supports utf8"
3107 .It Li "client_width" Ta "" Ta "Width of client"
3108 .It Li "cursor_flag" Ta "" Ta "Pane cursor flag"
3109 .It Li "cursor_x" Ta "" Ta "Cursor X position in pane"
3110 .It Li "cursor_y" Ta "" Ta "Cursor Y position in pane"
3111 .It Li "history_bytes" Ta "" Ta "Number of bytes in window history"
3112 .It Li "history_limit" Ta "" Ta "Maximum window history lines"
3113 .It Li "history_size" Ta "" Ta "Size of history in bytes"
3114 .It Li "host" Ta "#H" Ta "Hostname of local host"
3115 .It Li "host_short" Ta "#h" Ta "Hostname of local host (no domain name)"
3116 .It Li "insert_flag" Ta "" Ta "Pane insert flag"
3117 .It Li "keypad_cursor_flag" Ta "" Ta "Pane keypad cursor flag"
3118 .It Li "keypad_flag" Ta "" Ta "Pane keypad flag"
3119 .It Li "line" Ta "" Ta "Line number in the list"
3120 .It Li "mouse_any_flag" Ta "" Ta "Pane mouse any flag"
3121 .It Li "mouse_button_flag" Ta "" Ta "Pane mouse button flag"
3122 .It Li "mouse_standard_flag" Ta "" Ta "Pane mouse standard flag"
3123 .It Li "mouse_utf8_flag" Ta "" Ta "Pane mouse UTF-8 flag"
3124 .It Li "pane_active" Ta "" Ta "1 if active pane"
3125 .It Li "pane_current_command" Ta "" Ta "Current command if available"
3126 .It Li "pane_current_path" Ta "" Ta "Current path if available"
3127 .It Li "pane_dead" Ta "" Ta "1 if pane is dead"
3128 .It Li "pane_height" Ta "" Ta "Height of pane"
3129 .It Li "pane_id" Ta "#D" Ta "Unique pane ID"
3130 .It Li "pane_in_mode" Ta "" Ta "If pane is in a mode"
3131 .It Li "pane_synchronized" Ta "" Ta "If pane is synchronized"
3132 .It Li "pane_index" Ta "#P" Ta "Index of pane"
3133 .It Li "pane_pid" Ta "" Ta "PID of first process in pane"
3134 .It Li "pane_start_command" Ta "" Ta "Command pane started with"
3135 .It Li "pane_start_path" Ta "" Ta "Path pane started with"
3136 .It Li "pane_tabs" Ta "" Ta "Pane tab positions"
3137 .It Li "pane_title" Ta "#T" Ta "Title of pane"
3138 .It Li "pane_tty" Ta "" Ta "Pseudo terminal of pane"
3139 .It Li "pane_width" Ta "" Ta "Width of pane"
3140 .It Li "saved_cursor_x" Ta "" Ta "Saved cursor X in pane"
3141 .It Li "saved_cursor_y" Ta "" Ta "Saved cursor Y in pane"
3142 .It Li "scroll_region_lower" Ta "" Ta "Bottom of scroll region in pane"
3143 .It Li "scroll_region_upper" Ta "" Ta "Top of scroll region in pane"
3144 .It Li "session_attached" Ta "" Ta "1 if session attached"
3145 .It Li "session_created" Ta "" Ta "Integer time session created"
3146 .It Li "session_created_string" Ta "" Ta "String time session created"
3147 .It Li "session_group" Ta "" Ta "Number of session group"
3148 .It Li "session_grouped" Ta "" Ta "1 if session in a group"
3149 .It Li "session_height" Ta "" Ta "Height of session"
3150 .It Li "session_id" Ta "" Ta "Unique session ID"
3151 .It Li "session_name" Ta "#S" Ta "Name of session"
3152 .It Li "session_width" Ta "" Ta "Width of session"
3153 .It Li "session_windows" Ta "" Ta "Number of windows in session"
3154 .It Li "window_active" Ta "" Ta "1 if window active"
3155 .It Li "window_activity_flag" Ta "" Ta "1 if window has activity alert"
3156 .It Li "window_bell_flag" Ta "" Ta "1 if window has bell"
3157 .It Li "window_content_flag" Ta "" Ta "1 if window has content alert"
3158 .It Li "window_find_matches" Ta "" Ta "Matched data from the find-window"
3159 .It Li "window_flags" Ta "#F" Ta "Window flags"
3160 .It Li "window_height" Ta "" Ta "Height of window"
3161 .It Li "window_id" Ta "" Ta "Unique window ID"
3162 .It Li "window_index" Ta "#I" Ta "Index of window"
3163 .It Li "window_layout" Ta "" Ta "Window layout description"
3164 .It Li "window_name" Ta "#W" Ta "Name of window"
3165 .It Li "window_panes" Ta "" Ta "Number of panes in window"
3166 .It Li "window_silence_flag" Ta "" Ta "1 if window has silence alert"
3167 .It Li "window_width" Ta "" Ta "Width of window"
3168 .It Li "wrap_flag" Ta "" Ta "Pane wrap flag"
3170 .Sh NAMES AND TITLES
3172 distinguishes between names and titles.
3173 Windows and sessions have names, which may be used to specify them in targets
3174 and are displayed in the status line and various lists: the name is the
3176 identifier for a window or session.
3177 Only panes have titles.
3178 A pane's title is typically set by the program running inside the pane and
3181 It is the same mechanism used to set for example the
3186 Windows themselves do not have titles - a window's title is the title of its
3189 itself may set the title of the terminal in which the client is running, see
3194 A session's name is set with the
3199 A window's name is set with one of:
3202 A command argument (such as
3210 .Bd -literal -offset indent
3211 $ printf '\e033kWINDOW_NAME\e033\e\e'
3214 Automatic renaming, which sets the name to the active command in the window's
3217 .Ic automatic-rename
3221 When a pane is first created, its title is the hostname.
3222 A pane's title can be set via the OSC title setting sequence, for example:
3223 .Bd -literal -offset indent
3224 $ printf '\e033]2;My Title\e033\e\e'
3227 When the server is started,
3229 copies the environment into the
3230 .Em global environment ;
3231 in addition, each session has a
3232 .Em session environment .
3233 When a window is created, the session and global environments are merged.
3234 If a variable exists in both, the value from the session environment is used.
3235 The result is the initial environment passed to the new process.
3238 .Ic update-environment
3239 session option may be used to update the session environment from the client
3240 when a new session is created or an old reattached.
3242 also initialises the
3244 variable with some internal information to allow commands to be executed
3245 from inside, and the
3247 variable with the correct terminal setting of
3250 Commands to alter and view the environment are:
3252 .It Xo Ic set-environment
3254 .Op Fl t Ar target-session
3255 .Ar name Op Ar value
3257 .D1 (alias: Ic setenv )
3258 Set or unset an environment variable.
3261 is used, the change is made in the global environment; otherwise, it is applied
3262 to the session environment for
3263 .Ar target-session .
3266 flag unsets a variable.
3268 indicates the variable is to be removed from the environment before starting a
3270 .It Xo Ic show-environment
3272 .Op Fl t Ar target-session
3275 .D1 (alias: Ic showenv )
3276 Display the environment for
3278 or the global environment with
3282 is omitted, all variables are shown.
3283 Variables removed from the environment are prefixed with
3288 includes an optional status line which is displayed in the bottom line of each
3290 By default, the status line is enabled (it may be disabled with the
3292 session option) and contains, from left-to-right: the name of the current
3293 session in square brackets; the window list; the title of the active pane
3294 in double quotes; and the time and date.
3296 The status line is made of three parts: configurable left and right sections
3297 (which may contain dynamic content such as the time or output from a shell
3300 .Ic status-left-length ,
3303 .Ic status-right-length
3304 options below), and a central window list.
3305 By default, the window list shows the index, name and (if any) flag of the
3306 windows present in the current session in ascending numerical order.
3307 It may be customised with the
3308 .Ar window-status-format
3310 .Ar window-status-current-format
3312 The flag is one of the following symbols appended to the window name:
3313 .Bl -column "Symbol" "Meaning" -offset indent
3314 .It Sy "Symbol" Ta Sy "Meaning"
3315 .It Li "*" Ta "Denotes the current window."
3316 .It Li "-" Ta "Marks the last window (previously selected)."
3317 .It Li "#" Ta "Window is monitored and activity has been detected."
3318 .It Li "!" Ta "A bell has occurred in the window."
3319 .It Li "+" Ta "Window is monitored for content and it has appeared."
3320 .It Li "~" Ta "The window has been silent for the monitor-silence interval."
3321 .It Li "Z" Ta "The window's active pane is zoomed."
3324 The # symbol relates to the
3325 .Ic monitor-activity
3329 The window name is printed in inverted colours if an alert (bell, activity or
3330 content) is present.
3332 The colour and attributes of the status line may be configured, the entire
3333 status line using the
3335 session option and individual windows using the
3336 .Ic window-status-style
3339 The status line is automatically refreshed at interval if it has changed, the
3340 interval may be controlled with the
3344 Commands related to the status line are as follows:
3346 .It Xo Ic command-prompt
3349 .Op Fl t Ar target-client
3352 Open the command prompt in a client.
3353 This may be used from inside
3355 to execute commands interactively.
3359 is specified, it is used as the command.
3362 is a comma-separated list of the initial text for each prompt.
3367 is a comma-separated list of prompts which are displayed in order; otherwise
3368 a single prompt is displayed, constructed from
3370 if it is present, or
3378 may contain the special character sequences supported by the
3382 Before the command is executed, the first occurrence of the string
3384 and all occurrences of
3386 are replaced by the response to the first prompt, the second
3390 are replaced with the response to the second prompt, and so on for further
3392 Up to nine prompt responses may be replaced
3398 .It Xo Ic confirm-before
3400 .Op Fl t Ar target-client
3403 .D1 (alias: Ic confirm )
3404 Ask for confirmation before executing
3410 is the prompt to display; otherwise a prompt is constructed from
3412 It may contain the special character sequences supported by the
3416 This command works only from inside
3418 .It Xo Ic display-message
3420 .Op Fl c Ar target-client
3421 .Op Fl t Ar target-pane
3424 .D1 (alias: Ic display )
3428 is given, the output is printed to stdout, otherwise it is displayed in the
3435 section; information is taken from
3439 is given, otherwise the active pane for the session attached to
3444 maintains a stack of
3446 Up to the value of the
3448 option are kept; when a new buffer is added, the buffer at the bottom of the
3450 Buffers may be added using
3454 command, and pasted into a window using the
3458 A configurable history buffer is also maintained for each window.
3459 By default, up to 2000 lines are kept; this can be altered with the
3465 The buffer commands are as follows:
3470 .Op Fl t Ar target-window
3473 Put a window into buffer choice mode, where a buffer may be chosen
3474 interactively from a list.
3475 After a buffer is selected,
3477 is replaced by the buffer index in
3479 and the result executed as a command.
3482 is not given, "paste-buffer -b '%%'" is used.
3483 For the meaning of the
3488 This command works only if at least one client is attached.
3489 .It Ic clear-history Op Fl t Ar target-pane
3490 .D1 (alias: Ic clearhist )
3491 Remove and free the history for the specified pane.
3492 .It Ic delete-buffer Op Fl b Ar buffer-index
3493 .D1 (alias: Ic deleteb )
3494 Delete the buffer at
3496 or the top buffer if not specified.
3497 .It Xo Ic list-buffers
3500 .D1 (alias: Ic lsb )
3501 List the global buffers.
3502 For the meaning of the
3507 .It Xo Ic load-buffer
3508 .Op Fl b Ar buffer-index
3511 .D1 (alias: Ic loadb )
3512 Load the contents of the specified paste buffer from
3514 .It Xo Ic paste-buffer
3516 .Op Fl b Ar buffer-index
3517 .Op Fl s Ar separator
3518 .Op Fl t Ar target-pane
3520 .D1 (alias: Ic pasteb )
3521 Insert the contents of a paste buffer into the specified pane.
3522 If not specified, paste into the current one.
3525 also delete the paste buffer from the stack.
3526 When output, any linefeed (LF) characters in the paste buffer are replaced with
3527 a separator, by default carriage return (CR).
3528 A custom separator may be specified using the
3533 flag means to do no replacement (equivalent to a separator of LF).
3536 is specified, paste bracket control codes are inserted around the
3537 buffer if the application has requested bracketed paste mode.
3538 .It Xo Ic save-buffer
3540 .Op Fl b Ar buffer-index
3543 .D1 (alias: Ic saveb )
3544 Save the contents of the specified paste buffer to
3548 option appends to rather than overwriting the file.
3549 .It Xo Ic set-buffer
3550 .Op Fl b Ar buffer-index
3553 .D1 (alias: Ic setb )
3554 Set the contents of the specified buffer to
3556 .It Xo Ic show-buffer
3557 .Op Fl b Ar buffer-index
3559 .D1 (alias: Ic showb )
3560 Display the contents of the specified buffer.
3563 Miscellaneous commands are as follows:
3565 .It Ic clock-mode Op Fl t Ar target-pane
3566 Display a large clock.
3569 .Op Fl t Ar target-pane
3570 .Ar shell-command command
3578 returns success or the second
3581 Before being executed, shell-command is expanded using the rules specified in the
3583 section, including those relevant to
3588 is run in the background.
3590 .D1 (alias: Ic lock )
3591 Lock each client individually by running the command specified by the
3596 .Op Fl t Ar target-pane
3599 .D1 (alias: Ic run )
3602 in the background without creating a window.
3603 Before being executed, shell-command is expanded using the rules specified in
3609 the command is run in the background.
3610 After it finishes, any output to stdout is displayed in copy mode (in the pane
3613 or the current pane if omitted).
3614 If the command doesn't return success, the exit status is also displayed.
3619 .D1 (alias: Ic wait )
3620 When used without options, prevents the client from exiting until woken using
3623 with the same channel.
3626 is used, the channel is locked and any clients that try to lock the same
3627 channel are made to wait until the channel is unlocked with
3630 This command only works from outside
3633 .Sh TERMINFO EXTENSIONS
3635 understands some extensions to
3639 Set the cursor colour.
3640 The first takes a single string argument and is used to set the colour;
3641 the second takes no arguments and restores the default cursor colour.
3642 If set, a sequence such as this may be used
3643 to change the cursor colour from inside
3645 .Bd -literal -offset indent
3646 $ printf '\e033]12;red\e033\e\e'
3649 Change the cursor style.
3650 If set, a sequence such as this may be used
3651 to change the cursor to an underline:
3652 .Bd -literal -offset indent
3653 $ printf '\e033[4 q'
3658 is set, it will be used to reset the cursor style instead
3662 This sequence can be used by
3664 to store the current buffer in the host terminal's selection (clipboard).
3667 option above and the
3673 offers a textual interface called
3675 This allows applications to communicate with
3677 using a simple text-only protocol.
3679 In control mode, a client sends
3681 commands or command sequences terminated by newlines on standard input.
3682 Each command will produce one block of output on standard output.
3683 An output block consists of a
3685 line followed by the output (which may be empty).
3686 The output block ends with a
3695 have two arguments: an integer time (as seconds from epoch) and command number.
3697 .Bd -literal -offset indent
3699 0: ksh* (1 panes) [80x24] [layout b25f,80x24,0,0,2] @2 (active)
3705 outputs notifications.
3706 A notification will never occur inside an output block.
3708 The following notifications are defined:
3710 .It Ic %exit Op Ar reason
3713 client is exiting immediately, either because it is not attached to any session
3714 or an error occurred.
3717 describes why the client exited.
3718 .It Ic %layout-change Ar window-id Ar window-layout
3719 The layout of a window with ID
3724 .It Ic %output Ar pane-id Ar value
3725 A window pane produced output.
3727 escapes non-printable characters and backslash as octal \\xxx.
3728 .It Ic %session-changed Ar session-id Ar name
3729 The client is now attached to the session with ID
3733 .It Ic %session-renamed Ar name
3734 The current session was renamed to
3736 .It Ic %sessions-changed
3737 A session was created or destroyed.
3738 .It Ic %unlinked-window-add Ar window-id
3741 was created but is not linked to the current session.
3742 .It Ic %window-add Ar window-id
3745 was linked to the current session.
3746 .It Ic %window-close Ar window-id
3750 .It Ic %window-renamed Ar window-id Ar name
3757 .Bl -tag -width "@SYSCONFDIR@/tmux.confXXX" -compact
3762 .It Pa @SYSCONFDIR@/tmux.conf
3763 System-wide configuration file.
3771 .Dl $ tmux new-session vi
3773 Most commands have a shorter form, known as an alias.
3774 For new-session, this is
3779 Alternatively, the shortest unambiguous form of a command is accepted.
3780 If there are several options, they are listed:
3781 .Bd -literal -offset indent
3783 ambiguous command: n, could be: new-session, new-window, next-window
3786 Within an active session, a new window may be created by typing
3796 Windows may be navigated with:
3798 (to select window 0),
3800 (to select window 1), and so on;
3802 to select the next window; and
3804 to select the previous window.
3806 A session may be detached using
3808 (or by an external event such as
3810 disconnection) and reattached with:
3812 .Dl $ tmux attach-session
3816 lists the current key bindings in the current window; up and down may be used
3817 to navigate the list or
3821 Commands to be run when the
3823 server is started may be placed in the
3826 Common examples include:
3828 Changing the default prefix key:
3829 .Bd -literal -offset indent
3830 set-option -g prefix C-a
3832 bind-key C-a send-prefix
3835 Turning the status line off, or changing its colour:
3836 .Bd -literal -offset indent
3837 set-option -g status off
3838 set-option -g status-style bg=blue
3841 Setting other options, such as the default command,
3842 or locking after 30 minutes of inactivity:
3843 .Bd -literal -offset indent
3844 set-option -g default-command "exec /bin/ksh"
3845 set-option -g lock-after-time 1800
3848 Creating new key bindings:
3849 .Bd -literal -offset indent
3850 bind-key b set-option status
3851 bind-key / command-prompt "split-window 'exec man %%'"
3852 bind-key S command-prompt "new-window -n %1 'ssh %1'"
3857 .An Nicholas Marriott Aq Mt nicm@users.sourceforge.net