Termio

tmux Guide

tmux from zero to productive.

Termio connects to your tmux panes over the network. This guide takes you from a fresh install to a polished, plugin-powered setup — in about 15 minutes.

What is tmux?

tmux is a terminal multiplexer — it keeps your terminal sessions alive even after you close your laptop, and lets you split the screen into multiple panes. Termio talks to tmux directly: whatever runs inside your panes, your iPhone sees it in real time.

Session

A named workspace. Survives terminal close. You can have multiple sessions for different projects.

Window

A tab inside a session. Switch between windows like browser tabs.

Pane

A split within a window. Run multiple commands side-by-side. Termio connects to a pane.

Every tmux shortcut starts with a prefix key Ctrl-b by default. Press Ctrl-b, release, then press the next key.

Install tmux

macOS

brew install tmux

Ubuntu / Debian

sudo apt install tmux

Verify

tmux -V   # should print tmux 3.x

Essential shortcuts

The recommended config below remaps splits and navigation to be more intuitive. These shortcuts assume that config is in place.

  • Ctrl-b, then ddetach — leave session running in background
  • Ctrl-b, then cnew window (like a browser tab)
  • Ctrl-b, then n / pnext / previous window
  • Ctrl-b, then \split pane horizontally
  • Ctrl-b, then -split pane vertically
  • Ctrl-b, then h/j/k/lnavigate panes (vim-style)
  • Ctrl-b, then H/J/K/Lresize the current pane
  • Ctrl-b, then zzoom pane to full screen (toggle)
  • Ctrl-b, then ssession tree picker — switch between sessions
  • Ctrl-b, then [enter copy mode — scroll and search terminal output
  • Ctrl-b, then rreload config (with recommended setup)
  • Ctrl-b, then m / Mmouse on / off (with recommended setup)

Starter config

Copy this to ~/.tmux.conf. It sets up vim-style pane navigation, intuitive splits, clipboard copy mode, the tmux-power gold theme, and session persistence via resurrect + continuum.

~/.tmux.conf

# ── General ──────────────────────────────────────────────
set -g mouse on               # click to focus, scroll, drag to resize
set -g base-index 1           # windows start at 1, not 0
setw -g pane-base-index 1
set -g renumber-windows on    # auto-renumber when a window is closed
set -g history-limit 50000    # large scrollback buffer
set -sg escape-time 10        # faster escape (vim-friendly)
set -g focus-events on

# ── Pane navigation (vim-style) ──────────────────────────
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# ── Pane resize ──────────────────────────────────────────
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5

# ── Splits (stay in current directory) ───────────────────
bind '\' split-window -h -c '#{pane_current_path}'
bind  '-' split-window -v -c '#{pane_current_path}'
unbind '"'
unbind %

# ── Useful shortcuts ─────────────────────────────────────
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
bind m set -g mouse on  \; display "Mouse ON"
bind M set -g mouse off \; display "Mouse OFF"

# ── Copy mode (vi-style) ─────────────────────────────────
setw -g mode-keys vi
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-selection

# ── Plugins (TPM) ────────────────────────────────────────
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'wfxr/tmux-power'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'

# ── tmux-power theme ─────────────────────────────────────
set -g @tmux_power_theme 'gold'
set -g @tmux_power_use_bold 1
set -g @tmux_power_date_format '%m/%d'
set -g @tmux_power_time_format '%H:%M'
set -g @tmux_power_show_user 0
set -g @tmux_power_show_host 0

# ── Session persistence ──────────────────────────────────
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'

# Initialize TPM — keep this at the very bottom
run '~/.tmux/plugins/tpm/tpm'

Install TPM and plugins

TPM (Tmux Plugin Manager) downloads and manages plugins with a single keypress. Run this once to bootstrap it:

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Then open a new tmux session and press Ctrl-b, Shift-I to install all plugins listed in your config.

The starter config already includes these recommended plugins:

  • tmux-plugins/tpmplugin manager — install everything else with prefix+I
  • tmux-plugins/tmux-sensiblesensible defaults most configs agree on
  • wfxr/tmux-powerbeautiful powerline status bar with 7 colour themes
  • tmux-plugins/tmux-resurrectsave and restore sessions across reboots
  • tmux-plugins/tmux-continuumauto-save sessions every 15 minutes
  • tmux-plugins/tmux-yankcopy to system clipboard from copy mode

Choosing a theme

tmux-power ships seven colour themes. Change @tmux_power_theme in your config and reload with Ctrl-b r:

  • gold
  • moon
  • coral
  • forest
  • violet
  • snow
  • sky

Sessions that survive reboots

With resurrect + continuum enabled (already in the starter config), your sessions and pane contents are saved automatically every 15 minutes. After a reboot, tmux restores everything on first launch.

  • Ctrl-b, Ctrl-ssave session manually
  • Ctrl-b, Ctrl-rrestore session manually

Quick-start checklist

  1. Install tmux
  2. Copy the starter config to ~/.tmux.conf
  3. Install TPM
  4. Open a new terminal and run: tmux new -s work
  5. Press Ctrl-b then Shift-I to install plugins
  6. Your status bar turns gold — tmux is ready
  7. Open Termio on your iPhone and connect to this session