System Servicesterminalmultiplexertmuxsessionswindows

tmux

tmux is a terminal multiplexer that enables multiple terminals or windows to be accessed and controlled from a single terminal, similar to screen. It operates as a server-client system with consistent command syntax.

Description

tmux allows users to manage multiple terminal sessions efficiently within a single interface. It creates a server automatically when needed, holding sessions that can contain multiple windows. Clients can connect to these sessions, or the server can be controlled via tmux commands issued from the shell.

The tool provides a consistent and well-documented command interface usable interactively, as key bindings, or from the shell. It supports vim or Emacs key layouts for user preference. Communication occurs through a socket, defaulting to /tmp.

tmux is particularly useful for maintaining persistent terminal sessions, especially in remote or unstable connections, making it valuable for system administration and development workflows.

How It Works

tmux runs as a server-client system where a server is created automatically and holds sessions, each with multiple windows. Clients connect to sessions via a socket in /tmp by default. Commands share the same syntax whether interactive, key-bound, or shell-invoked, supporting vim or Emacs layouts.

Installation

bash
sudo apt install tmux

Flags

-2usage flag
-Cusage flag
-Dusage flag
-hshow usage help
-lusage flag
-Nusage flag
-uusage flag
-Vusage flag
-vusage flag
-c shell-commandexecute shell-command
-f fileuse configuration file
-L socket-nameset socket name
-S socket-pathset socket path
-T featuresset features

Examples

Displays the usage help for tmux
tmux -h
Starts tmux, creating a server and new session if necessary
tmux
Runs tmux with a specific configuration file
tmux -f file
Runs tmux with a custom socket name
tmux -L socket-name
Runs tmux with a custom socket path
tmux -S socket-path
Executes a specific shell command in tmux
tmux -c shell-command
Runs tmux with specified features
tmux -T features
Updated 2026-04-16kali.org ↗