system enabled verified low v1.0.0

tmux

Terminal multiplexer for managing multiple shell sessions, persistent remote workspaces, and split-pane terminal layouts.

📋 Live Preview
tmux {flag-2} {flag-c} {flag-f} {flag-h} {flag-l}
๐Ÿ“Ž flag-2 ๐Ÿ“Ž flag-c ๐Ÿ“Ž flag-f ๐Ÿ“Ž flag-h ๐Ÿ“Ž flag-l
tmux {flag-2} {flag-c} {flag-f} {flag-h} {flag-l}

Sandbox: execFile · Timeout: 300s

Capabilities

system.terminal.multiplex
system.terminal.session
system.terminal.split
system.process.background
system.session.persist
system.remote.detach

Parameters

Name Type Required Default Description Aliases
flag-2 string No - Force tmux to assume the terminal supports 256 colours -2
flag-c string No - Execute shell-command using the default shell. If neces- sary, the tmux server will be started to retrieve the default-shell option. This option is for compatibility with sh(1) when tmux is used as... -c, -c
flag-f string No - Specify an alternative configuration file. By default -f
flag-h string No - Print usage information and exit -h
flag-L file No - tmux stores the server socket in a directory under TMUX_TMPDIR or /tmp if it is unset. The default socket is named default. This option allows a different socket name to be specified, allowing seve... -L, -n
flag-l string No - Behave as a login shell. This flag currently has no ef- -l
flag-S file No - 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 -S, -p
flag-T string No - Set terminal features for the client. This is a comma- -T
flag-u string No - Write UTF-8 output to the terminal even if the first envi- -u
flag-v string No - Request verbose logging. Log messages will be saved into -v
flag-c-2 file No - to working-directory -c
flag-a string No - flag clears alerts (bell, activity, or silence) in all win- dows linked to the session -a
flag-n string No - Set the flag-n parameter -n, -c, -t
flag-F string No - Set the flag-F parameter -F
flag-C string No - window for a control mode client, size must be one of `widthxheight' or `window ID:widthxheight', for example `80x24' or `@0:80x24'. -A allows a control mode client to trigger ac- tions on a pane. ... -C
flag-B number No - The argument is split into three items by colons: name is a name for the subscription; what is a type of item to subscribe to; format is the format. After a subscription is added, changes to the fo... -B
flag-f-2 string No - list of client flags, see -f, -s
flag-l-2 string No - cape sequence. If target-pane is given, the clipboard is sent (in encoded form), otherwise it is stored in a new paste buffer -l
flag-L-2 string No - right, up or down by adjustment, if the window is larger than the client. -c resets so that the position follows the cursor. See the window-size option -L, -R, -U, -D
flag-a-2 string No - user. If the user is already attached, the -d flag causes their clients to be detached -a, -d
flag-r string No - clients read-only and -w writable. -l lists current access per- missions -r, -w, -r
flag-J string No - Set the flag-J parameter -J, -T
flag-T-2 string No - will be interpreted from key-table. This may be used to config- ure multiple prefix keys, or to bind commands to sequences of keys. For example, to make typing `abc' run the list-keys com- mand: -T
flag-u-2 string No - down. -H hides the position indicator in the top right. -q cancels copy mode and any other modes -u, -d
flag-M string No - ing, see "MOUSE SUPPORT"). -S scrolls when bound to a mouse drag event; for example, copy-mode -Se is bound to MouseDrag1ScrollbarSlider by default -M
flag-s string No - Set the flag-s parameter -s, -p, -p
flag-e string No - 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 ... -e
flag-w string No - suitable for use with select-layout. For example: -w
flag-S-2 string No - the first line of the visible pane and negative numbers are lines in the history. `-' to -S is the start of the history and to -E the end of the visible pane. The default is to capture only the vis... -S, -E
flag-y string No - used in client mode: -y
flag-O string No - `creation' (time), or `activity' (time). -r reverses the sort order. -f specifies an initial filter: the filter is a format - if it evaluates to zero, the item in the list is not shown, oth- erwise it is shown. If a filter would lead to an empty list, it is ignored. -F specifies the format for each item in the list and -K a format for each shortcut key; both are evaluated once for each line. -N starts without the preview or if given twice with the larger preview. This command works only if at least one client is attached -O
flag-O-2 string No - `time' (activity). -r reverses the sort order. -f specifies an initial filter: the filter is a format - if it evaluates to zero, the item in the list is not shown, otherwise it is shown. If a filter would lead to an empty list, it is ignored. -F specifies the format for each item in the tree and -K a format for each shortcut key; both are evaluated once for each line. -N starts without the preview or if given twice with the larger preview. -G includes all sessions in any session groups in the tree rather than only the first. This command works only if at least one client is attached -O
flag-f-3 string No - evaluates to zero, the item in the list is not shown, otherwise it is shown. If a filter would lead to an empty list, it is ig- nored. -F specifies the format for each item in the tree. -N starts without the option information. This command works only if at least one client is attached -f
flag-d string No - means the indicator stays until a key is pressed. While the in- dicator is on screen, a pane may be chosen with the `0' to `9' keys, which will cause template to be executed as a command with `%%' substituted by the pane ID. The default template is "se- lect-pane -t '%%'". With -b, other commands are not blocked from running until the indicator is closed -d, -p, -t
flag-m string No - -m
flag-k string No - and a window named window-name already exists, it is selected (unless -d is also given in which case the command does noth- ing) -k, -S
flag-c-3 string No - created -c
flag-e-2 string No - able for the newly created window; it may be specified multiple times -e
flag-I string No - connected to the pane: with -I stdout is connected (so anything shell-command prints is written to the pane as if it were typed); with -O stdin is connected (so any output in the pane is piped to shell-command). Both may be used together and if nei- ther are specified, -O is used -I, -O, -c
flag-D integer No - adjustment is given in lines or columns (the default is 1); -x and -y may be a given as a number of lines or columns or fol- lowed by `%' for a percentage of the window size (for example `-x 10%'). With -Z, the active pane is toggled between zoomed (occupying the whole of the window) and unzoomed (its normal po- sition in the layout) -D, -L, -R, -x, -y
flag-M-2 string No - binding, see "MOUSE SUPPORT") -M
flag-T-3 string No - lines out of the history to replace them -T
flag-D-2 string No - The -D, -L, -R, -x, -y
flag-Z string No - -Z
flag-D-3 string No - left, to the right, or above the target pane is used. -Z keeps the window zoomed if it was zoomed. -l is the same as using the last-pane command. -e enables or -d disables input to the pane. -T sets the pane title -D, -L, -R, -U
flag-m-2 string No - one marked pane at a time, setting a new marked pane clears the last. The marked pane is the default target for -s to join-pane, move-pane, swap-pane and swap-window -m, -M
flag-Z-2 string No - ready zoomed -Z
flag-m-3 string No - -m
flag-m-4 string No - the current window -m
flag-M-3 string No - key binding, see "MOUSE SUPPORT") -M
flag-X string No - AND PANES" section. -N specifies a repeat count and -F expands formats in arguments where appropriate -X
flag-q string No - -q
flag-F-2 string No - option, so a session inherits the option from the global options (or with -g, restores a global option to the default). -U un- sets an option (like -u) but if the option is a pane option also unsets the option on any panes in the window. value depends on the option and its type and can be omitted for flag and choice options to toggle its value (choice options toggle between the first two choices) -F, -u
flag-a-3 string No - ground -a
flag-d-2 string No - acter. The default is 80x24 -d
flag-1 integer No - resulting input is a single character. -k is like -1 but the key press is translated to a key name. -N makes the prompt only accept numeric key presses. -i executes the command every time the prompt input changes instead of when the user exits the com- mand prompt -1
flag-T-4 string No - are offered when Tab is pressed. Available types are: `command', `search', `target' and `window-target' -T
flag-b string No - See popup-border-lines for possible values for border-lines -b
flag-H string No - -H
flag-s-2 string No - menu border (see "STYLES") -s, -S
flag-T-5 string No - -T
flag-C-2 string No - bound to a mouse key binding -C
flag-x string No - column number, or one of the following special values: -x, -y
flag-M-4 string No - only menus opened from mouse key bindings do so -M
flag-v-2 string No - the format variables and their values -v, -a
flag-I-2 string No - target-pane -I
flag-s-3 string No - nored -s, -S
flag-E string No - -E closes the popup only if shell-command exited with success. -k allows any key to dismiss the popup instead of only `Escape' or `C-c' -E, -c
flag-x-2 string No - meaning as for the display-menu command. -w and -h give the width and height - both may be a percentage (followed by `%'). If omitted, half of the terminal size is used -x, -y
flag-B-2 string No - -B
flag-b-2 string No - When -B is specified, the -b option is ignored. See popup-border-lines for possible values for border-lines -b
flag-s-4 string No - popup border (see "STYLES") -s, -S
flag-e-3 string No - able for the popup; it may be specified multiple times -e
flag-T-6 string No - -T
flag-N string No - -N, -E, -E, -k
flag-T-7 string No - See -T
flag-y-2 string No - used in buffer mode: -y
flag-O-3 string No - `name' or `size'. -r reverses the sort order. -f specifies an initial filter: the filter is a format - if it evaluates to zero, the item in the list is not shown, otherwise it is shown. If a filter would lead to an empty list, it is ignored. -F specifies the format for each item in the list and -K a format for each shortcut key; both are evaluated once for each line. -N starts without the preview. This command works only if at least one client is attached -O
flag-w-2 string No - target-client using the xterm(1) escape sequence, if possible. If path is `-', the contents are read from stdin -w
flag-E-2 file No - it. If -c is given, the current working directory is set to start-directory. If -C is not given, any output to stdout is displayed in view mode (in the pane specified by -t or the cur- rent pane if omitted) after the command finishes. If the com- mand fails, the exit status is also displayed -E

Artifacts

TypeDescriptionMIMESchemaTrust
system.terminal.sessionTmux session state--verified
system.terminal.captureCaptured terminal pane contenttext/plain-verified

Contract

Inputs

system.terminal.command

Command to execute in a tmux pane

Outputs

system.terminal.capture

Output captured from the pane

Side effects: process_spawn

Workflow Edges

Produces

system.terminal.capture

Consumes

system.terminal.command

Resource Profile

ResourceValue
CPUlow
Memory8 MB
Networknone
Disk I/Olow

Examples

Create a new named session

tmux new-session -s mysession -d

Attach to an existing session

tmux attach-session -t mysession

Split window horizontally

tmux split-window -h

Send a command to a pane

tmux send-keys -t mysession:0 'htop' Enter

Capture pane content to file

tmux capture-pane -t mysession:0 -p > output.txt

List all running sessions

tmux list-sessions

Start a new session:

tmux

Start a new named session:

tmux new-session -s name

List existing sessions:

tmux ls

Attach to the most recently used session:

tmux attach-session

Attach to a named session:

tmux attach-session -t name

Documentation

Tmux โ€” Terminal Multiplexer

Tmux is a terminal multiplexer that allows multiple terminal sessions to be accessed simultaneously in a single window. It's essential for remote work, long-running processes, and efficient terminal workflows.

Key Bindings

The default prefix key is Ctrl+b. Release both keys before pressing the command.

Sessions

Binding Action
Ctrl+b d Detach from session
Ctrl+b s List sessions (interactive)
Ctrl+b $ Rename current session
Ctrl+b ( / ) Switch to previous/next session

Windows

Binding Action
Ctrl+b c Create new window
Ctrl+b , Rename current window
Ctrl+b n / p Next/previous window
Ctrl+b w List windows

Panes

Binding Action
Ctrl+b % Split vertically
Ctrl+b " Split horizontally
Ctrl+b arrow Navigate panes
Ctrl+b z Zoom pane fullscreen
Ctrl+b x Kill current pane

Configuration

Create ~/.tmux.conf:

# Use Ctrl+a as prefix (easier reach)
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# Mouse support
set -g mouse on

# Increase scrollback
set -g history-limit 50000

# Status bar customization
set -g status-bg colour235
set -g status-fg white
set -g status-interval 5

Headless Operation

# Create session without attaching
tmux new-session -d -s mysession 'python server.py'

# Send additional commands later
tmux send-keys -t mysession 'curl http://localhost:8080/health' Enter

# Capture output
tmux capture-pane -t mysession -p

Related Tools

  • screen โ€” Classic terminal multiplexer
  • byobu โ€” Screen/tmux wrapper with profiles
  • zellij โ€” Modern terminal multiplexer written in Rust

Related Tools

screenbyobuweztermzellij

References