Back to services

tmux

tmux source code

View alternatives to tmux
Suggest edit
Open source
Self-hostable
ISC
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Note: The official website could not be retrieved this time, so the information below is based on existing knowledge of tmux.

Introduction

tmux is an open-source terminal multiplexer. In a single terminal window, you can create multiple terminals, switch between them, and split the screen into multiple panes. Its most notable feature is that sessions can be "detached": after you disconnect or close the terminal, the programs in the session keep running in the background, and you can reattach later from the same machine or a different one. tmux was originally developed by Nicholas Marriott, is released under the ISC license, and its source code is hosted on GitHub (tmux/tmux).

Key Features

  • Three-level structure of sessions, windows, and panes: a session contains multiple windows, and each window can be split into multiple panes.
  • Detach and reattach: tasks are not interrupted when an SSH connection drops. After logging back in, run tmux attach to return to your original working environment.
  • Client/server architecture: multiple clients can connect to the same session at the same time, which is well suited to pair programming or screen sharing.
  • Copy mode: scroll through past output, search, select, and copy text, with both vi and emacs key styles supported.
  • Customizable status bar and key bindings: configure the prefix key, key bindings, colors, and status bar content through ~/.tmux.conf.
  • Scriptable: every action can be run through the tmux command, making it easy to write scripts that set up your working layout automatically.

Target Users and Use Cases

  • Operations engineers and developers who often manage remote servers over SSH
  • People who run long tasks (compiling, data processing, model training) and don't want a dropped connection to interrupt them
  • Developers who like working in the terminal and want an editor, logs, and a shell open in one window
  • Teams that need remote collaboration or pair programming

Core Strengths

  • Lightweight and stable, with very low resource usage
  • Widely regarded as a modern alternative to GNU Screen, with more flexible configuration and more active development
  • A rich ecosystem, with plugin managers (such as TPM) and plenty of community configurations

Installation

On most systems you can install it directly with your package manager:

# Debian / Ubuntu
sudo apt install tmux
# Fedora / RHEL
sudo dnf install tmux
# Arch Linux
sudo pacman -S tmux
# macOS (Homebrew)
brew install tmux

Building from source requires libevent and ncurses, then run ./configure && make.

Basic Usage

  • tmux new -s name: create a new session
  • The default prefix key is Ctrl-b. Ctrl-b d detaches the session, Ctrl-b % splits the screen left and right, Ctrl-b " splits it top and bottom, and Ctrl-b c creates a new window
  • tmux ls: list all sessions; tmux attach -t name: reattach to a session

Technical Requirements

Supports Unix-like systems such as OpenBSD, FreeBSD, NetBSD, Linux, macOS, and Solaris. Windows users can use it in WSL or Cygwin.