Terminal GuideTerminal Guide
tmux icon

tmux

Multiplexers
macOSLinux
C

Terminal multiplexer for session management, window splitting, and detach/attach.

Official Website

Features

Session ManagementWindow SplittingDetach/AttachScriptingStatus Bar

Installation

Homebrew
brew install tmux
APT (Debian/Ubuntu)
apt install tmux
Pacman (Arch)
pacman -S tmux
DNF (Fedora)
dnf install tmux

Why Use tmux?

tmux (terminal multiplexer) is a tool that allows you to manage multiple sessions within a single terminal window and split screens for efficient work. It maintains sessions even when SSH connections drop, making it essential for remote server work.

Session Persistence

Keep working sessions alive even when SSH connections drop. Reconnect and continue working seamlessly. Essential for server management.

Flexible Screen Splitting

Split screens freely in any direction to create panes. Monitor editors, logs, and command execution all on one screen.

Multiple Window Management

Switch between multiple windows like tabs. Organize and manage by project or task type.

Advanced Customization

Freely customize keybindings, status bar, and colors. Extend functionality with plugins.

Basic Usage

About the Prefix Key

All tmux operations start with the prefix key. The default is Ctrl + b. When prefix is mentioned below, press Ctrl + b first, then the next key.

Example: prefix + c = Press Ctrl + b, then press c

Starting and Exiting tmux

Basic Commands
# Start tmux
tmux

# Start with a session name
tmux new -s mysession

# Exit tmux (close all windows)
exit

# Or use prefix + d to detach (keep the session alive)

Essential Key Bindings

Here are the most commonly used tmux key bindings. For a complete reference, see the full cheat sheet.

ActionKey
Detach from sessionprefix + d
Create new windowprefix + c
Next / previous windowprefix + n / p
Vertical split (side by side)prefix + %
Horizontal split (stacked)prefix + "
Navigate between panesprefix + arrow
Zoom / restore paneprefix + z
Enter copy modeprefix + [

In-Depth Guides

Dive deeper into specific tmux topics with our comprehensive guides.

Tips

  • Using tmux new -A -s main is convenient: it attaches if the session exists, or creates a new one if it doesn't.
  • Many people change the prefix key to Ctrl+a (same as screen). See the configuration guide.
  • Press prefix + z to temporarily maximize a pane. Press again to restore.
  • Using tmux Plugin Manager (tpm) simplifies plugin management. See the plugins guide to get started.
  • Press prefix + ? to view the current keybindings. Useful for checking after configuration changes.
Written by Dai AokiPublished: 2026-01-20Updated: 2026-02-22

Related Articles

GNU Screen - Terminal Multiplexer

Classic terminal multiplexer with session persistence

tools8 min read

Zellij - Modern Terminal Multiplexer

Modern Rust-based terminal multiplexer with intuitive UI

tools8 min read

Byobu - tmux/screen Wrapper

Enhanced wrapper for tmux and screen with convenient keybindings

tools6 min read

tmux Cheat Sheet: All Key Bindings & Commands

Complete tmux cheat sheet with all keyboard shortcuts, commands, and quick reference tables for sessions, windows, panes, and copy mode.

tools5 min read

tmux Split Window & Pane Management Guide

Master tmux split windows and pane management. Learn horizontal and vertical splits, pane navigation, resizing, layouts, zoom, synchronized input, and practical workflows.

tools10 min read

tmux Session Management: Complete Guide

Complete guide to tmux session management. Learn how to create, attach, detach, list, and organize sessions for efficient terminal workflows.

tools8 min read

tmux.conf Configuration Guide: Customize Your tmux

Complete tmux.conf configuration guide. Learn prefix key customization, key bindings, status bar styling, mouse settings, true color, performance tuning, and workflow-specific configs.

tools12 min read

tmux Copy Mode: Copy, Paste & Clipboard Guide

Master tmux copy mode for copying text, searching, and clipboard integration. Covers vi and emacs modes, system clipboard setup for macOS and Linux, and buffer management.

tools8 min read

tmux Plugins Guide: TPM, Resurrect, Continuum & More

Complete guide to tmux plugins. Learn TPM (Tmux Plugin Manager) setup, essential plugins like resurrect, continuum, sensible, yank, and vim-navigator with best practices.

tools10 min read

Explore More