Terminal multiplexers: PTYs, tmux, SSH and Tailscale explained
12 steps · about 4 h 45 min · Intermediate
- A Guide to the Terminal, Console, and Shell (article, The Valuable Dev, 20 min)
Start by separating the terminal, the console and the shell, so the rest of the list has a vocabulary to build on.
- The terminal, the TTY, and the shell - The Linux Field Guide (article, The Linux Field Guide, 15 min)
This shows the three independent layers (emulator, pty, shell) and how they cooperate through the kernel.
- How Terminal Emulators Work · Kaku Blog (article, Kaku Blog, 15 min)
It follows bytes from the shell through the PTY and a parser to a grid of cells, and it contrasts a terminal with tmux.
- Exploring Terminals, TTYs, and PTYs (article, cefboud, 20 min)
It adds hands-on detail on signals, job control and a Python emulator that keeps the screen state.
- Control Sequences - Concepts (doc, Ghostty docs, 15 min)
Programs talk to terminals only by writing bytes, so you need to know how escape sequences separate text from commands.
- libghostty-vt: Your First Terminal (doc, libghostty docs, 25 min)
You feed escape sequences into a real terminal library and read the screen back, which is the engine inside Rex.
- TTY Architecture: PTY, Line Discipline, Shell, and Terminal (article, terminfo.dev, 15 min)
It shows why a multiplexer acts as both a PTY master and a terminal emulator, which is the key idea behind persistent sessions.
- tmux Tutorial: A Terminal Multiplexer Guide for Developers (tutorial, qadrlabs, 40 min)
Practise sessions, windows, panes, detach and attach in the classic multiplexer, so Rex's model feels familiar.
- Tmux Fundamentals: Free Course on Terminal Multiplexing (guide, Linux Handbook, 1 h)
This goes further into copy mode, workflows and configuration, which turns the basics into a daily setup.
- SSH Keys Easily Explained (article, DEV Community, 10 min)
Remote sessions need SSH, and the padlock-and-key picture explains how it authenticates you without a password.
- SSH Tutorial for Beginners: Generate Keys, Connect to VPS, and Deploy Securely (tutorial, Hashnode, 30 min)
Generate an ed25519 key and connect to a server, so you have a real machine to host a persistent session.
- Tailscale Mesh VPN Architecture: Coordination, NAT and ACLs (article, tailscaleguide.com, 20 min)
Last, learn how devices reach each other behind NAT, which is how a phone can attach to a session running on a distant server.