Definition

tmux

tmux is a terminal multiplexer that runs multiple shells in one window with splits, tabs, and detachable sessions that survive disconnects.

tmux is the most widely used terminal multiplexer on Unix systems. It runs a persistent server that holds your shell sessions, splits them into windows and panes, and lets you detach and reattach — so your work survives SSH disconnects, laptop closes, and terminal crashes. It's become the de facto standard for remote development on servers.

Why it matters

Before tools like SpaceSpider, tmux was the only practical way for most developers to run several CLIs side-by-side in one terminal. It's still the answer when you're SSH'd into a server and need a layout that persists. On the local dev machine, modern GUI-first apps (SpaceSpider, Zellij, Warp) are easier because you get mouse support, scroll history, and a richer UI without editing a config file.

For agentic coding workflows specifically, tmux is often used to run multiple Claude Code or Codex CLI panes in one session. SpaceSpider replaces that pattern with a GUI-first grid layout and persistent spaces.

How it works

tmux starts a long-running server process. When you run tmux new it creates a session with one window (tab) containing one pane (a PTY running your shell). You split panes horizontally (C-b %) or vertically (C-b "), create more windows (C-b c), and navigate with prefix key combinations.

Key features:

  • Detach/reattach (C-b d then tmux attach) — the server keeps running
  • Copy mode with vi or emacs keybindings
  • Scriptable layouts via tmux new-window, split-window, send-keys
  • Per-session config in ~/.tmux.conf
  • Plugins via TPM (tmux plugin manager)

How it's used

Typical tmux workflows:

  • SSH into a server, run tmux attach to resume your layout
  • Run several long-lived processes (server, log tail, tests) in different panes
  • Use tmux send-keys scripts to lay out a development environment in one command
  • Pair with AI coding CLIs for parallel agents

FAQ

Should I use tmux or SpaceSpider?

Use tmux on remote servers or when you need a text-only multiplexer that runs anywhere. Use SpaceSpider locally when you want a GUI, mouse support, pre-configured spaces, and first-class agentic CLI integration. Many developers use both.

Is tmux the same as GNU screen?

They solve the same problem (detachable multi-shell sessions) but tmux has better defaults, active development, and easier scripting. Most users have moved from screen to tmux over the last decade.

Related terms