← Back to tools

tmux

Terminal multiplexer for managing multiple sessions

Description

tmux is a terminal multiplexer that lets you switch between several programs in one terminal, detach them, and reattach them to a different terminal. It's invaluable for remote work, long-running processes, and organizing terminal workflows.

Install

homebrewbrew install tmux
aptsudo apt install tmux
pacmansudo pacman -S tmux

AI Summary

Terminal multiplexer. Run multiple terminal sessions in one window, detach and reattach sessions, split panes. Essential for remote work and persistent terminal sessions.

Capabilities

  • + Multiple terminal sessions in a single window
  • + Detach/reattach sessions (survives SSH disconnects)
  • + Split panes horizontally and vertically
  • + Session, window, and pane management
  • + Scriptable and highly configurable
  • + Copy mode with vi/emacs keybindings
  • + Plugin ecosystem (tpm)

Use When

  • Working over SSH and need persistent sessions
  • Running long-running processes that shouldn't die with the terminal
  • Need multiple terminal panes in one view
  • Building a reproducible terminal layout for development

Avoid When

  • x Using a terminal emulator with built-in tiling (e.g., kitty, WezTerm)
  • x Quick one-off commands
  • x Need GPU-accelerated rendering in terminal

Usage Patterns

Start a new named session

tmux new-session -s work

Creates a new tmux session named 'work'

Detach and reattach

tmux attach -t work

Reattaches to a previously detached session

Split pane horizontally

Ctrl-b %

Splits the current pane into left and right

Input / Output

Exit codes:
0 Success
1 Error

Related Tools

View AGENTS.md for tmux