tmux — Terminal Multiplexer
tmux lets you run multiple terminal sessions inside one window, and keep them running even after you disconnect. Essential for working on remote servers over SSH.
Why use tmux?
- Start a long-running task, disconnect, reconnect later — it's still running
- Split one terminal into multiple panes
- Keep several projects organized in named sessions
Start a new session
tmux # Unnamed session
tmux new -s work # Named session "work"
List sessions
tmux ls
tmux list-sessions
Attach to an existing session
tmux attach -t work
tmux a -t work # Short form
Kill a session
tmux kill-session -t work
The prefix key
Almost every tmux shortcut starts with a prefix, by default Ctrl+b. You press Ctrl+b, release, then press the next key.