Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

tmux and screen

20. 06. 2025 Updated: 27. 03. 2026 2 min read intermediate

tmux and screen are terminal multiplexers — they allow multiple terminals in one window and survive SSH disconnections. When an SSH connection drops, processes in a tmux/screen session continue running. After reconnecting, you simply return to your work in progress. For system administrators and developers working with remote servers, this is an indispensable tool.

tmux

tmux new -s work                       # new session named work
tmux attach -t work                    # attach to existing session
tmux ls                                # list sessions
# Ctrl+b d=detach, c=new window, %=vertical split, "=horizontal split, z=zoom pane

tmux supports any number of windows and panes within a session. Panes can be moved, resized, and switched between using keyboard shortcuts. Windows work like tabs — switch between them with Ctrl+b number. A key strength of tmux is scriptability — you can automatically create layouts with specific commands in each pane.

Configuration

# ~/.tmux.conf
set -g prefix C-a                      # change prefix from Ctrl+b to Ctrl+a
set -g mouse on                        # mouse support
set -g base-index 1                    # number windows from 1
set -g history-limit 50000             # larger scroll buffer
set -g default-terminal "screen-256color"
bind | split-window -h                 # | for vertical split
bind - split-window -v                 # - for horizontal split

screen

screen -S work                         # new session
screen -r work                         # attach
# Ctrl+a d=detach, c=window, n/p=next/previous

Screen is an older alternative, still present on most systems. It has simpler configuration but fewer features than tmux. For basic session persistence it is fully adequate, but for advanced workflows with panes and scripting, tmux is the better choice.

tmux for everyday

Protection against SSH outage is just the beginning. Set up tmux as your default environment on every server — 10 keyboard shortcuts are enough to significantly boost productivity. For an even better experience, try tmux plugin manager (tpm) with plugins like tmux-resurrect for saving and restoring sessions.

tmuxscreenterminal
Share:

CORE SYSTEMS team

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.