I started using tmux to keep terminal sessions running after disconnecting from SSH. Here’s what I use most.

Start a new session:

tmux

Start a named session:

tmux new -s work

Detach from session (keeps it running):

Ctrl+b d

List sessions:

tmux ls

Reattach to a session:

tmux attach -t work

Split panes horizontally:

Ctrl+b "

Split panes vertically:

Ctrl+b %

Switch between panes:

Ctrl+b arrow-key

Kill current pane:

Ctrl+b x

The key thing is Ctrl+b - that’s the prefix for all tmux commands.

My tmux config highlights Link to heading

I keep my .tmux.conf fairly minimal, but these settings make tmux much more pleasant:

# Remap prefix from Ctrl+b to Ctrl+a (easier to reach)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

# Split panes using | and - (more intuitive)
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %

# Switch panes using Alt+arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Enable mouse support (useful for resizing panes)
set -g mouse on

# Start window numbering at 1 (not 0)
set -g base-index 1

# Automatically renumber windows when one is closed
set -g renumber-windows on

# Increase scrollback buffer
set -g history-limit 10000

The prefix remap to Ctrl+a is probably the biggest quality-of-life improvement. Much easier to hit than Ctrl+b, especially if you’re coming from GNU screen.

tmux vs screen vs zellij Link to heading

GNU screen was what I learnt first. It’s older and more stable, but the defaults are worse and the split pane support is clunky. If you’re already a screen user and it works for you, there’s no urgent reason to switch. But for new users, I’d say skip screen and go straight to tmux.

tmux is the recommended choice. Better defaults, active development, and much better split pane support. The config language is more powerful too. The only downside is the learning curve if you’re used to screen’s key bindings, but it’s worth it.

zellij is the new Rust-based alternative. I tried it briefly and it’s very polished - nice UI, good defaults, built-in layouts. If I were starting fresh today I’d probably use zellij. But I’ve got years of muscle memory with tmux, and switching felt like effort for not much gain. If you’re brand new to terminal multiplexers though, zellij is worth trying.

My honest take: they all do the job. Pick one, learn it properly, and you’ll be fine.