The Terminal Multiplexer That
Powers Every Developer's Workflow.
tmux is a free and open-source terminal multiplexer for Unix-like operating systems that allows users to create, access, and control multiple terminal sessions from a single screen. It enables persistent sessions that continue running after disconnection, making it indispensable for remote server work, development workflows, and system administration. tmux is released under the ISC license and is available on Linux, macOS, and Windows via WSL.
What is tmux?
tmux (terminal multiplexer) is a command-line tool that lets you switch between several programs in one terminal, detach them (they keep running in the background), and reattach them to a different terminal. Unlike a standard terminal session, tmux sessions persist even when the SSH connection drops, making it the standard tool for long-running processes on remote servers. tmux organizes work into sessions, windows, and panes — a three-level hierarchy that gives users complete control over their terminal workspace.
Session Persistence
Detach from a session and reattach later from any machine. Your programs keep running in the background, making tmux perfect for remote server work and long compilations that must survive connection drops.
Split Panes
Divide your terminal window into multiple panes horizontally or vertically. Monitor logs, edit code, and run tests all in one high-visibility dashboard without switching windows.
Scriptable Automation
Automate your entire environment. Use shell scripts to spawn complex multi-window layouts instantly upon login or project startup — tmux is fully scriptable through its command interface.
A Complete Terminal Workspace Engine.
tmux gives you a professional set of tools to manage terminal sessions, windows, and panes with full, high-fidelity control over your workflow.
Client-Server Model
tmux uses a robust client-server architecture. Multiple clients can attach to the same session simultaneously, enabling real-time pair programming and shared monitoring of production servers without latency.
Window Management
Create multiple windows per tmux session, just like browser tabs. Navigate between windows instantly, rename them for context, and organize complex projects by keeping each component in its own dedicated window. This level of organization is the hallmark of a professional terminal workflow.
Command Mode
Enter command mode with Ctrl+b : to execute powerful internal tmux commands. Manage windows, panes, and buffers with a few keystrokes without ever leaving your shell.
Plugin Ecosystem
Extend tmux with the Tmux Plugin Manager (TPM). Add session saving, clipboard integration, and theme management through a large community library of plugins.
Highly Configurable — ~/.tmux.conf
Customize every key binding, the status bar, colors, pane borders, and behavior via a simple plain-text configuration file at ~/.tmux.conf. Don't like Ctrl+b? Rebind the prefix. Every single key in tmux is rebindable to match your muscle memory and enhance your speed.
📥 Install tmux
tmux is available on all major platforms via package managers or from source. Choose your OS to get started.
| Method | Command | Notes |
|---|---|---|
| Homebrew Recommended |
brew install tmux
|
Latest stable release. Install Homebrew first if needed. |
| MacPorts |
sudo port install tmux
|
Alternative to Homebrew. |
| Build from Source |
git clone https://github.com/tmux/tmux.git
|
Full source guide → |
| Verify |
tmux -V
|
Should print tmux 3.6a |
Need detailed steps with iTerm2 tips and clipboard config? Full macOS Install Guide →
| Distro / Method | Command |
|---|---|
| Ubuntu / Debian |
sudo apt update && sudo apt install tmux
|
| Fedora / RHEL / CentOS |
sudo dnf install tmux
|
| Arch Linux |
sudo pacman -S tmux
|
| Alpine Linux |
apk add tmux
|
| Snap (any distro) |
sudo snap install tmux --classic
|
| Build from Source |
git clone https://github.com/tmux/tmux.git
|
Need version compatibility tables and troubleshooting? Full Linux Install Guide →
WSL2 (Windows Subsystem for Linux)
The best tmux experience on Windows. Enable WSL2 in PowerShell, install Ubuntu from the Microsoft Store, then run:
sudo apt update && sudo apt install tmux
Cygwin
Install Cygwin and select the tmux package during setup. Note: WSL2 provides a more complete Unix experience.
Full WSL2 setup with Windows Terminal integration: Full Windows Install Guide →
tmux vs Screen vs Zellij vs Byobu
Unlike GNU Screen, tmux offers a modern, actively maintained codebase with a rich plugin ecosystem and superior pane management. Compared to Zellij, tmux has a larger community, more mature plugin support, and decades of battle-tested reliability on production servers. Unlike Byobu (which is a configuration wrapper that runs on top of tmux or Screen), tmux provides direct, low-level control over every aspect of terminal multiplexing.
| Feature | tmux | GNU Screen | Zellij | Byobu |
|---|---|---|---|---|
| Active Development | ✅ Yes | ⚠️ Minimal | ✅ Yes | ⚠️ Depends on tmux |
| Plugin Ecosystem | ✅ TPM (Extensive) | ❌ None | ⚠️ WebAssembly plugins | ⚠️ Limited |
| Multi-Pane Splits | ✅ Native & Advanced | ⚠️ Limited | ✅ Native | ✅ Via tmux |
| Session Persistence | ✅ High Reliability | ✅ Native | ✅ Yes | ✅ Via tmux |
| Scripting / Automation | ✅ Fully Scriptable | ⚠️ Basic | ⚠️ Limited | ⚠️ Basic |
| Mouse Support | ✅ Full | ⚠️ Partial | ✅ Full | ✅ Full |
| Unicode / 256-color Support | ✅ Modern Full | ⚠️ Partial | ✅ Modern Full | ✅ Via tmux |
| Learning Curve | ⚠️ Moderate | ⚠️ Moderate | ✅ Low (UI-first) | ✅ Low |
| Windows Native Support | ⚠️ Via WSL2 | ⚠️ Via Cygwin | ✅ Native binary | ⚠️ Via WSL2 |
| Configuration Complexity | ⚠️ Manual .tmux.conf | ⚠️ Manual .screenrc | ✅ GUI + YAML | ✅ Low (pre-configured) |
Essential tmux Commands
The most-searched tmux commands and key bindings, ready to copy. All commands use the default Ctrl+b prefix.
The tmux Plugin Ecosystem
The Tmux Plugin Manager (TPM) is the standard way to extend tmux. Install TPM once,
then manage any community plugin with a single line in your ~/.tmux.conf.
# 1. Clone TPM into tmux plugins directory
$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# 2. Add to ~/.tmux.conf
$ echo "set -g @plugin 'tmux-plugins/tpm'" >> ~/.tmux.conf
$ echo "run '~/.tmux/plugins/tpm/tpm'" >> ~/.tmux.conf
# 3. Reload config, then press Ctrl+b I to install
$ tmux source ~/.tmux.conf
| Plugin | Description | Install Snippet |
|---|---|---|
| tmux-resurrect | Save and restore tmux sessions across system restarts. Ctrl+b Ctrl+s to save, Ctrl+b Ctrl+r to restore. | set -g @plugin 'tmux-plugins/tmux-resurrect' |
| tmux-continuum | Automatic saving of tmux sessions every 15 minutes. Pairs with tmux-resurrect for seamless persistence. | set -g @plugin 'tmux-plugins/tmux-continuum' |
| tmux-sensible | A set of sensible tmux default settings that everyone can agree on. Start here if you're new to configuring tmux. | set -g @plugin 'tmux-plugins/tmux-sensible' |
| tmux-yank | Copy to the system clipboard in tmux copy mode. Essential for macOS and Linux clipboard integration. | set -g @plugin 'tmux-plugins/tmux-yank' |
| tmux-fingers | Smart text picking — highlight URLs, IP addresses, file paths and open or copy them instantly. | set -g @plugin 'Morantron/tmux-fingers' |
| tmux-open | Open highlighted text or file paths in the default application — URLs open in browser, files in editor. | set -g @plugin 'tmux-plugins/tmux-open' |
| Oh My Tmux | A self-contained, opinionated tmux configuration framework with a beautiful status bar and sensible defaults. | git clone https://github.com/gpakosz/.tmux.git |
Interactive .tmux.conf Generator
Configure your settings below and get a ready-to-use ~/.tmux.conf file instantly. No manual editing required.
Settings
~/.tmux.conf
Explore All tmux Resources
Frequently Asked Questions
Common questions about tmux — answered definitively.
What is tmux and what is it used for?
How do I install tmux on macOS?
brew install tmux in your terminal. If Homebrew is not installed, first run /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)". You can also install tmux via MacPorts with sudo port install tmux. Verify the installation by running tmux -V. See the full macOS tmux install guide for iTerm2 tips and clipboard integration.
How do I install tmux on Windows?
wsl --install, install Ubuntu from the Microsoft Store, then run sudo apt update && sudo apt install tmux inside WSL2. Alternatively, use MSYS2 and run pacman -S tmux. See the full Windows tmux install guide for Windows Terminal integration tips.
What is the difference between tmux and GNU Screen?
How do I detach from a tmux session without killing it?
Ctrl+b then d. This sends the detach command to tmux and returns you to your normal shell prompt. The tmux session and all programs running inside it continue running in the background. You can reattach later with tmux attach or tmux attach -t session-name.
How do I reattach to a tmux session?
tmux attach (reattaches to the most recent session) or tmux attach -t mysession to reattach to a named session. First list all available sessions with tmux ls. You can reattach from any terminal — even over SSH from a different machine — as long as the tmux server is still running on the host.
How do I change the tmux prefix key from Ctrl+b to Ctrl+a?
Ctrl+b to Ctrl+a, add the following to your ~/.tmux.conf file:unbind C-bset -g prefix C-abind C-a send-prefixThen reload the configuration with
tmux source-file ~/.tmux.conf or Ctrl+b : followed by source-file ~/.tmux.conf. Ctrl+a is the traditional GNU Screen prefix and is popular among Screen users.
tmux not working — common fixes
tmux: command not found — tmux is not installed. Install it with your package manager (e.g.,
brew install tmux on macOS).no server running on /tmp/tmux-XXXX/default — No tmux server is running. Start a new session with
tmux new.Colors not displaying correctly — Add
set -g default-terminal "screen-256color" or "tmux-256color" to your ~/.tmux.conf.Clipboard not working on macOS — Install the
tmux-yank plugin or add set -g mouse on to enable terminal-native selection.
What is TPM (Tmux Plugin Manager) and how do I install it?
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm. Then add set -g @plugin 'tmux-plugins/tpm' and run '~/.tmux/plugins/tpm/tpm' to the bottom of your ~/.tmux.conf. Reload the config and press Ctrl+b I inside tmux to install plugins. Use Ctrl+b U to update and Ctrl+b alt+u to remove unused plugins.
How do I make tmux sessions survive a reboot?
set -g @plugin 'tmux-plugins/tmux-resurrect') to manually save sessions with Ctrl+b Ctrl+s and restore with Ctrl+b Ctrl+r. Pair it with tmux-continuum (set -g @plugin 'tmux-plugins/tmux-continuum' with set -g @continuum-restore 'on') for fully automatic session saving and restoration every 15 minutes.