🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

tmux Complete Guide: The Ultimate Terminal Multiplexer (2026)

tmux Complete Guide: The Ultimate Terminal Multiplexer (2026)
tmux Complete Guide - Terminal Multiplexer

tmux: The Ultimate Terminal Multiplexer

Sessions, windows, panes, plugins & advanced configuration

Download Free Cheat Sheet (8-Page PDF)

tmux (terminal multiplexer) is the most popular terminal multiplexer in the Linux/Unix world. It lets you create multiple terminal sessions within a single window, split your screen into panes, and — most importantly — keep sessions alive even when you disconnect. For sysadmins and developers working on remote servers, tmux is indispensable.

Why Use tmux?

Persistent Sessions

SSH disconnects? No problem. Your tmux session keeps running. Reattach anytime and pick up exactly where you left off.

Split Panes

Split your terminal into multiple panes — monitor logs, edit files, and run commands all in one window.

Session Sharing

Share your terminal with colleagues for pair programming or live debugging. Both users see the same session in real-time.

Installation

# Ubuntu/Debian
sudo apt install tmux

# CentOS/RHEL
sudo yum install tmux

# macOS
brew install tmux

# Check version
tmux -V

Session Management

Sessions are the top-level container in tmux. Each session is independent and persists until you kill it.

tmux                          # Start new unnamed session
tmux new -s myproject         # Start named session
tmux ls                       # List all sessions
tmux attach -t myproject      # Attach to session
tmux kill-session -t myproject  # Kill session
Shortcut Action
Ctrl+B, DDetach from session
Ctrl+B, $Rename session
Ctrl+B, sList sessions (interactive)
Ctrl+B, (Switch to previous session
Ctrl+B, )Switch to next session

Window Management

Windows are like tabs within a session. Each window has its own shell.

Shortcut Action
Ctrl+B, cCreate new window
Ctrl+B, ,Rename window
Ctrl+B, n / pNext / Previous window
Ctrl+B, 0-9Jump to window by number
Ctrl+B, wInteractive window list
Ctrl+B, &Kill window

Pane Splitting & Navigation

Panes split a window into multiple terminal areas. This is where tmux really shines.

Shortcut Action
Ctrl+B, %Split vertically (left | right)
Ctrl+B, "Split horizontally (top / bottom)
Ctrl+B, ArrowNavigate between panes
Ctrl+B, zZoom pane (toggle fullscreen)
Ctrl+B, xKill current pane
Ctrl+B, SpaceCycle pane layouts
Ctrl+B, qShow pane numbers

Pro Tip: Zoom is your best friend

Press Ctrl+B, z to zoom any pane to fullscreen. Press it again to restore. This is incredibly useful when you need to temporarily see more of a log file or code editor without reorganizing your layout.

Copy Mode & Scrollback

Ctrl+B, [    # Enter copy mode (navigate with arrow keys/Page Up/Down)
Space        # Start selection
Enter        # Copy selection
Ctrl+B, ]    # Paste
/            # Search forward in copy mode
?            # Search backward
q            # Exit copy mode

Configuration (.tmux.conf)

Place this file at ~/.tmux.conf for a productive setup:

# Change prefix to Ctrl+A (more ergonomic)
set -g prefix C-a
unbind C-b
bind C-a send-prefix

# Enable mouse
set -g mouse on

# Start numbering at 1
set -g base-index 1
setw -g pane-base-index 1

# 256 color support
set -g default-terminal "screen-256color"

# Increase scrollback
set -g history-limit 50000

# Faster escape time
set -sg escape-time 0

# Reload config with R
bind r source-file ~/.tmux.conf \; display "Config reloaded!"

# Intuitive splits
bind | split-window -h
bind - split-window -v

Essential Plugins (TPM)

Install Tmux Plugin Manager for easy plugin management:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
Plugin What it does
tmux-resurrectSave and restore sessions (survives system restarts)
tmux-continuumAuto-save sessions every 15 minutes
tmux-sensibleSane default settings
tmux-yankCopy to system clipboard
tmux-pain-controlBetter pane management keybindings

Download the Complete Cheat Sheet

Get all tmux, Screen, Byobu, and Zellij commands in a professionally designed 8-page PDF.

Download 8-Page Cheat Sheet (PDF)

Related Articles

Master Linux Administration

Explore our collection of 200+ IT eBooks covering Linux, DevOps, Cloud, and System Administration.

Browse All Books
Share this article:
Dorian Thorne
About the Author

Dorian Thorne

Cloud Infrastructure, Cloud Architecture, Infrastructure Automation, Technical Documentation

Dorian Thorne is a cloud infrastructure specialist and technical author focused on the design, deployment, and operation of scalable cloud-based systems.

He has extensive experience working with cloud platforms and modern infrastructure practices, including virtualized environments, cloud networking, identity and acces...

Cloud Computing Cloud Networking Identity and Access Management Infrastructure as Code System Reliability

Stay Updated

Subscribe to our newsletter for the latest tutorials, tips, and exclusive offers.