Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 11, 2026·3 min de lecture

tmux — Terminal Multiplexer for Sessions, Windows, Panes

tmux is a terminal multiplexer that lets you switch between several programs in one terminal, detach them, and reattach them to a different terminal. Essential for SSH workflows, long-running processes, and pair programming.

Introduction

tmux (terminal multiplexer) lets you run multiple terminal sessions inside a single window. Create windows and panes, detach them (sessions keep running), and reattach later from any terminal — even after SSH disconnects. Essential tool for servers, long-running scripts, and pair programming.

What tmux Does

  • Sessions — top-level containers with multiple windows
  • Windows — full-screen tabs inside a session
  • Panes — splits inside a window
  • Detach/attach — keep sessions running in background
  • Scriptingtmux send-keys to drive panes
  • Copy mode — navigate scrollback, select, copy
  • Customization.tmux.conf for prefix, status bar, colors
  • Plugins — via TPM (tmux plugin manager)

Architecture

tmux runs a server process that owns sessions. Clients (terminals) attach to the server. Multiple clients can attach to the same session for mirror/pair sessions. State persists across client disconnects.

Self-Hosting

CLI tool.

Key Features

  • Sessions survive logout/SSH disconnect
  • Multiple windows + panes
  • Copy mode with vi or emacs keybinds
  • Scriptable via CLI
  • Customizable status bar
  • Plugin ecosystem (TPM)
  • Works over ssh and mosh
  • Synchronized panes for running same cmd in multiple

Comparison

Tool Type Config Sessions
tmux TUI .tmux.conf Yes
screen TUI .screenrc Yes
Zellij TUI (Rust) YAML/KDL Yes
Byobu tmux/screen wrapper Simplified Yes
iTerm2 GUI GUI prefs Yes (in-app)

FAQ

Q: Learning curve? A: Remember the prefix (default Ctrl+b) plus 10 shortcuts and you'll cover the basics. Pick up advanced features (resize, copy mode, macros) as you need them.

Q: How does it compare to Zellij? A: Zellij is more modern (Rust, batteries-included UI, layout presets), but tmux has a more mature ecosystem and a more stable server.

Q: What if my SSH drops? A: This is exactly where tmux shines. Run tmux new -s main, start your task; if it drops, ssh back in and tmux attach -t main — everything is exactly as you left it.

Sources & Credits

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires