DevLogTechnical writing
Tutorials

Getting started with tmux, the terminal multiplexer

September 24, 2026

If you've lost a long-running task because your SSH connection dropped, you already know the pain tmux solves. It is a terminal multiplexer: one terminal that can hold many terminals. It was created in 2007 by Nicholas Marriott as a clean, BSD-licensed alternative to the older GNU Screen, and it is free and open-source software. You can install it on Linux, macOS, OpenBSD, FreeBSD, and NetBSD. The current release series is 3.x.

What a multiplexer actually gives you

Three things make tmux worth learning:

Together they turn a single login into a workspace you can reattach to from anywhere.

Start a session

Install tmux with your system's package manager (apt, brew, dnf), then create a named session:

tmux new -s app

The -s gives your session a name, which makes it easy to find later. Your prompt looks the same, but you are now inside tmux.

The prefix key

Most tmux commands start with a prefix: Ctrl-b. Press Ctrl-b, release it, then press the command key. Think of it as "hey tmux, listen up." These are the moves you'll use every day:

Detach and reattach

Detaching is the magic trick. Press Ctrl-b d to detach. Your shell prompt returns, but the session keeps running in the background. You can walk away, come back hours later, even on a different machine, and resume:

tmux attach -t app

That single behavior — a shell that survives a dropped connection — is why tmux is standard issue on remote servers.

Keep an eye on what's running

Running several sessions and lost track? List them all:

tmux ls

Each row shows a session name, how many windows it holds, and when it was created.

Start small

You don't need every shortcut on day one. Master the prefix, one split, one detach-and-reattach, and the habit of starting long work inside tmux. That is enough to change how you work in the terminal. Once those feel natural, dig into panes, custom keybindings, and your ~/.tmux.conf to make the multiplexer truly yours.

← More Tutorials