tmux
Keeps shells alive independently of the terminal window attached to them.
Homebrew formula Direct download
What it does
tmux runs a server holding sessions; a terminal attaches to one and can detach without killing anything inside. Each session holds windows, each window splits into panes.
The practical payoff for a homelab: SSH into a box, start a long job inside tmux, lose the connection, reattach and it is still running.
tmux new -s lab # start a named session
tmux ls # list sessions
tmux attach -t lab # reattach
# C-b d detach · C-b % split vertical · C-b " split horizontalNotes
Pairs with pam-reattach on macOS — without it, Touch ID for sudo and clipboard access misbehave inside a tmux pane.
Alternative to
| Alternative | Type | Trade-off |
|---|---|---|
| Zellij | Open source | Friendlier defaults, discoverable keybindings, panes and layouts out of the box |
| GNU Screen | Open source | Older, simpler, usually already installed on a server |
| iTerm2 or WezTerm panes | Open source | Native splits, but they do not survive a lost connection |
nohup or systemd-run | Built in | If surviving disconnection is all you need |
Install
brew install tmux