Tmux Documentation
Tmux is a terminal multiplexer that lets you run multiple terminal sessions inside a single window, detach from sessions, and reattach later — even after SSH disconnects.
Who This Track Is For
- Operators managing remote servers over SSH who need persistent sessions
- Developers running long-running processes, logs, and editors side by side
- DevOps engineers automating multi-pane terminal workflows and monitoring
What You Will Build
- A reliable persistent session workflow surviving SSH drops
- A custom Tmux configuration with intuitive key bindings
- Scripted multi-pane layouts for common server management tasks
- Automated session templates for application monitoring
How To Use This Track
- Follow the modules in order (1 to 11). Each lesson includes real commands and exercises.
- Start with a non-production server or a local VM to practice safely.
- Copy/adapt the config examples to your own
.tmux.confas you progress.
Learning Path
| Module | Focus | Lessons |
|---|---|---|
| 1. Introduction | Fundamentals and mental model | 3 |
| 2. Sessions | Create, attach, detach, kill | 3 |
| 3. Windows and Panes | Layout and splitting | 3 |
| 4. Navigation and Shortcuts | Key bindings and navigation | 3 |
| 5. Configuration | .tmux.conf and customization | 3 |
| 6. Copy Mode | Scrollback, search, and copy/paste | 2 |
| 7. Scripting and Automation | Scripted layouts and automation | 3 |
| 8. Plugins | Plugin manager and individual plugin pages | 8 |
| 9. Server Configuration & Shell Integration | Your config, aliases, and session persistence | 3 |
| 10. Maintenance & Reference | Edit, reload, migrate, and maintain | 1 |
| 11. Cheatsheet | Fast operational reference | 3 |
Core Architecture
How Tmux Works
Detach and Reattach (SSH Safety)
warning
Without tmux (or screen), any process running in your SSH session is killed when the connection drops.
Quick Start
first-tmux-session.sh
# 1) Install tmux
sudo apt install -y tmux # Debian/Ubuntu
sudo dnf install -y tmux # RHEL/Fedora
# 2) Start a named session
tmux new-session -s work
# 3) Do your work...
# 4) Detach safely (keeps everything running)
# Press: Ctrl+b, then d
# 5) Reattach when you come back
tmux attach -t work
note
The default Tmux prefix key is Ctrl+b. Every tmux command starts by pressing this prefix, then another key.
Tmux vs Alternatives
| Tool | Use Case | Key Advantage |
|---|---|---|
tmux | Persistent sessions, multi-pane | Scriptable, widely available |
screen | Legacy persistent sessions | Simpler, older |
zellij | Modern terminal workspace | TUI, built-in plugins |
| SSH alone | Simple one-time tasks | No setup needed |
Prerequisites
- Linux shell basics (
ls,cd, paths) - SSH access to a server (or local terminal for practice)
- Basic understanding of processes and shells
Success Criteria
By the end of this track, you can:
- Start persistent sessions that survive SSH disconnects
- Split your terminal into multiple panes for simultaneous monitoring
- Write a script that launches a complete multi-pane layout automatically
- Customize Tmux with a
.tmux.confthat fits your workflow
Next Step
Start with What is Tmux.