The tmux Book
Internals, Automation, Extension Engineering, and Production Operations.
Coming soon
tmux treated as what it actually is: a persistent event-driven server, a client/server protocol, a multi-stage command language, and a terminal emulator. The book derives its explanations from a pinned upstream C source tree and its test suites, and keeps the documented contract of the manual separate from private implementation detail. It explains what a window, winlink, and pane are in memory, how bytes travel from a child PTY to your terminal, and why a command earlier in a config can complete later.
Status: all 48 chapters and 5 appendices are drafted and fact-checked (about 126,000 words). Verification and final production are underway.
First edition ships DRM-free as PDF and EPUB, with free updates.
From the event loop to production operations.
Architecture, the command and configuration engines, the terminal engine, expert operation, a real configuration under the microscope, plugin internals, and production patterns. Expand a part to see its chapters.
What this book assumes, and how to read it
Part 1 Foundations and Architecture 5 chapters
- 1 Why tmux
- 2 Building and Reading tmux
- 3 Clients, Servers, Sockets, and Protocol
- 4 The Object Graph
- 5 Events, Lifetimes, and Deferred Work
Part 2 Command, Configuration, and Policy Engines 7 chapters
- 6 The tmux Command Language
- 7 Arguments, Targets, and Context
- 8 The Command Queue
- 9 Configuration Loading and Reloading
- 10 Options, Scopes, Arrays, and Defaults
- 11 Formats, Styles, and Format Jobs
- 12 Keys, Tables, Hooks, and Mouse Events
Part 3 The Terminal Engine 10 chapters
- 13 The Terminal Engine
- 14 Spawning Panes and Owning PTYs
- 15 The Input State Machine
- 16 Characters, Cells, Colours, and Attributes
- 17 Screens, Grids, History, and Reflow
- 18 Layouts, Geometry, and Resize
- 19 Redraw, Damage, and TTY Output
- 20 Terminal Capabilities, Keys, and Colour Negotiation
- 21 Status Lines, Prompts, Menus, Popups, and Modes
- 22 Clipboard, Hyperlinks, and Images
Part 4 Expert Operation and Automation 5 chapters
- 23 Operating Sessions, Windows, and Panes
- 24 Copy Mode, Buffers, and Selection Semantics
- 25 Control Mode and Machine Interfaces
- 26 Named Servers, Multiuser Access, and Security
- 27 Performance, Diagnosis, Upgrade, and Recovery
Part 5 A Real Configuration Under the Microscope 4 chapters
- 28 Configuration Architecture and Load Order
- 29 The Local Key Model
- 30 Status, Formats, Hooks, and Naming
- 31 tmuxp, Shell, and Agent Integrations
Part 6 Extension Internals 13 chapters
- 32 The Plugin Surface and TPM
- 33 tmux-sensible
- 34 tmux-yank
- 35 tmux-logging
- 36 tmux-pain-control
- 37 tmux-jump
- 38 tmux-fingers
- 39 tmux-fzf-url
- 40 extrakto
- 41 tmux-pop
- 42 tmux-power-zoom
- 43 tmux-command-palette
- 44 tmux-window-name
Part 7 Production Patterns and Extension Engineering 4 chapters
- 45 The Incident-Response Workspace
- 46 Remote, Nested, SSH, and Mosh Workflows
- 47 Development, CI, and Declarative Sessions
- 48 Engineering and Auditing Extensions
Part 8 Appendices 5 appendices
- A Troubleshooting Field Guide
- B Commands, Options, Hooks, Formats, and Key Tables
- C Terminal Protocol and terminfo Field Guide
- D Sources, Reproducibility, Verification, and Version Migration
- E Glossary and Generated Subject Index
For engineers who already live in tmux.
Written for developers, SREs, and platform engineers who use terminals professionally. It assumes basic tmux familiarity and comfort thinking about processes, PTYs, and event loops. The source-reading workflow itself is taught.
- Users who want to predict and automate tmux: control mode, named servers, formats, hooks, and declarative sessions.
- Operators who debug rendering, keys, colors, and capability problems with evidence rather than restarts.
- Plugin authors and auditors who want to read extensions as programs, with one source-level chapter per plugin.
Coming soon.
The manuscript is written and the book is in production. Send us a short email and you will get one reply when it ships, with a sample chapter as soon as one is public.