tmux is essential for remote development and server administration, and genuinely useful for local development if you spend significant time in the terminal. It is not a replacement for a good terminal with tabs — it is a layer that adds persistence and flexibility that no terminal emulator provides natively.
What Problem tmux Solves
Three concrete problems, in order of how much they matter:
SSH sessions that survive disconnects. If you are running a long build, a database migration, or a dev server on a remote machine and your connection drops, the process dies. With tmux, you attach to a session running on the server, start your process, and detach. If the connection drops, the session keeps running on the server. You reconnect and reattach to find everything exactly as you left it.
Multiple terminal contexts without window management overhead. You can split a tmux window into panes — code editor on the left, test runner on the right, database shell at the bottom — all in one terminal window. This is more keyboard-driven than dragging terminal windows around, and it works the same locally and over SSH.
Session persistence across reboots (with the right plugin). With tmux-resurrect, you can save your session layout and restore it after a machine restart. Your split panes, window names, and running commands come back automatically.
Core Concepts
Sessions are the outermost container. Think of a session as a workspace for a project. You might have one session for your main application, another for a side project, another for server administration.
Windows are like tabs inside a session. Each window has its own full-screen layout.
Panes are splits within a window — horizontal or vertical divisions, each running an independent shell.
The hierarchy: session > windows > panes.
Essential Keybindings
tmux uses a prefix key before every command. The default is Ctrl+b. Everything below assumes this prefix.
Session management:
Ctrl+b d— detach from the current session (leaves it running)tmux new -s project-name— create a named sessiontmux attach -t project-name— attach to a named sessiontmux ls— list running sessionsCtrl+b $— rename the current session
Window management:
Ctrl+b c— create a new windowCtrl+b ,— rename the current windowCtrl+b n/Ctrl+b p— next/previous windowCtrl+b 0-9— switch to window by numberCtrl+b &— close the current window
Pane management:
Ctrl+b %— split vertically (left/right)Ctrl+b "— split horizontally (top/bottom)Ctrl+b arrow— navigate between panesCtrl+b z— zoom a pane to full screen (toggle)Ctrl+b x— close the current paneCtrl+b {/Ctrl+b }— swap pane positions
The .tmux.conf: Reproducible Setup
The default tmux configuration is usable but not great. A minimal ~/.tmux.conf that makes it significantly better:
# Change prefix to Ctrl+a (easier to reach)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Enable mouse support
set -g mouse on
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
# Easier pane splitting (use | and -)
bind | split-window -h
bind - split-window -v
# Vim-style pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Increase scrollback buffer
set -g history-limit 10000
# 256 colors
set -g default-terminal "screen-256color"
# Reload config without restart
bind r source-file ~/.tmux.conf ; display "Config reloaded"
Store this file in your dotfiles repository. On any new machine or server, one clone-and-symlink gives you your exact setup.
tmux + Neovim: Why They Work Well Together
Neovim is a terminal application. tmux lets you run Neovim in one pane while running your test suite, dev server, or database shell in adjacent panes — all in a single terminal window. The keyboard-driven workflow transfers: you navigate between panes with key chords just like you navigate between Neovim splits.
One consideration: the Ctrl+b or Ctrl+a prefix conflicts with some Neovim commands. With Neovim pane navigation mapped to Ctrl+h/j/k/l, the vim-tmux-navigator plugin makes pane switching transparent — the same keys work whether you are crossing a Neovim split or a tmux pane boundary.
Practical Session Layouts
A typical development session for a web project:
- Window 1 "code": Neovim in the full window
- Window 2 "server": dev server running, logs streaming
- Window 3 "shell": general-purpose shell for git commands, script runs, file operations
- Window 4 "db": database shell (mongosh, psql, redis-cli)
Create this layout at the start of your work session. Detach when you are done. The next day, reattach — everything is where you left it.
tmux-resurrect and tmux-continuum
tmux-resurrect saves your session state (windows, panes, layouts, running programs) with Ctrl+b Ctrl+s and restores it with Ctrl+b Ctrl+r. tmux-continuum automates saving every 15 minutes and restoring on tmux start.
After a machine restart, run tmux and the plugin restores your previous layout. Programs that were running (like a dev server) need to be restarted manually, but the window structure and pane layout come back automatically.
When tmux Is Overkill
For local development on a machine with a modern terminal emulator (Warp, iTerm2, Alacritty with tmux emulation), the value proposition weakens. These terminals provide tabs, splits, and session-like features natively with better font rendering and GPU acceleration than tmux provides.
tmux adds clear value when: you work on remote servers, you use SSH for development, you need sessions to survive disconnects, or you use a minimal terminal (like the built-in macOS Terminal) and want persistent layouts.
If you work entirely locally and your terminal provides good tab and split management, tmux is a preference, not a necessity.
Keep Reading
- Neovim for Modern Developers — the editor that pairs naturally with a tmux-based workflow
- Modern Unix Tools Guide — other terminal tools that fit into the same workflow
- AI Coding Tools Honest Comparison 2026 — how terminal-native development fits with AI coding tools
Pristren builds AI-powered software for teams. Zlyqor is our all-in-one workspace — chat, projects, time tracking, AI meeting summaries, and invoicing — in one tool. Try it free.