> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/tmux/tmux/llms.txt
> Use this file to discover all available pages before exploring further.

# tmux - Terminal Multiplexer

> A powerful terminal multiplexer that enables multiple terminals to be created, accessed, and controlled from a single screen.

## What is tmux?

tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

When tmux is started, it creates a new session with a single window and displays it on screen. A status line at the bottom of the screen shows information on the current session and is used to enter interactive commands.

## How tmux Works

In tmux, a session is displayed on screen by a client and all sessions are managed by a single server. The server and each client are separate processes which communicate through a socket in `/tmp`.

<CardGroup cols={3}>
  <Card title="Sessions" icon="layer-group">
    A session is a single collection of pseudo terminals under tmux management. Each session has one or more windows linked to it.
  </Card>

  <Card title="Windows" icon="window-maximize">
    A window occupies the entire screen and may be split into rectangular panes. Any number of windows may be present in the same session.
  </Card>

  <Card title="Panes" icon="table-cells">
    Each pane is a separate pseudo terminal. Windows can be split horizontally or vertically into multiple panes.
  </Card>
</CardGroup>

## Key Features

<CardGroup cols={2}>
  <Card title="Session Persistence" icon="clock-rotate-left">
    Sessions survive accidental disconnection (such as SSH connection timeout) or intentional detaching. Simply reattach when you're ready to continue.
  </Card>

  <Card title="Multiple Sessions" icon="users">
    Any number of tmux instances may connect to the same session. Share your terminal with others or access the same session from multiple locations.
  </Card>

  <Card title="Window Management" icon="grid-2">
    Split windows into multiple panes, create unlimited windows per session, and switch between them with keyboard shortcuts.
  </Card>

  <Card title="Cross-Platform" icon="laptop">
    Runs on OpenBSD, FreeBSD, NetBSD, Linux, macOS, and Solaris. Available through package managers on all major platforms.
  </Card>
</CardGroup>

## Use Cases

<Accordion title="Remote Development">
  Keep your development environment running on a remote server. Disconnect from SSH without losing your work, and reconnect from anywhere to pick up exactly where you left off.
</Accordion>

<Accordion title="Multi-Process Monitoring">
  Run multiple processes in separate panes within a single window. Monitor logs, run tests, and edit code simultaneously without switching terminal windows.
</Accordion>

<Accordion title="Pair Programming">
  Multiple users can attach to the same session, seeing the same content and working collaboratively in real-time.
</Accordion>

<Accordion title="Long-Running Tasks">
  Start long-running tasks, detach from the session, and reattach later to check progress. Your tasks continue running even when you're disconnected.
</Accordion>

## Architecture

The tmux architecture consists of three main components:

1. **Server**: A single background process that manages all sessions
2. **Sessions**: Collections of windows that persist independently
3. **Clients**: Terminal connections that attach to and display sessions

This client-server architecture is what enables tmux's persistence. When you detach from a session, only the client disconnects—the server and your session continue running.

<Info>
  Each session is persistent and will survive accidental disconnection. You can reattach using `tmux attach`.
</Info>

## Control with Key Bindings

tmux is controlled from an attached client using a key combination of a prefix key, `C-b` (Ctrl-b) by default, followed by a command key.

For example:

* `C-b c` creates a new window
* `C-b %` splits the current pane vertically
* `C-b "` splits the current pane horizontally
* `C-b d` detaches from the current session

Key bindings can be customized using the `bind-key` and `unbind-key` commands in your configuration file.

## Getting Started

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/installation">
    Install tmux on your platform using package managers or build from source.
  </Card>

  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Get up and running with tmux in 5 minutes. Learn the essential commands and workflow.
  </Card>
</CardGroup>

## System Requirements

tmux depends on:

* **libevent 2.x**: Event notification library
* **ncurses**: Terminal handling library
* **C compiler**: gcc or clang for building from source
* **make and pkg-config**: Build tools
* **yacc or bison**: Parser generator

<Tip>
  Most Linux distributions and macOS include these dependencies or make them available through package managers.
</Tip>
