Luke Oliff.

TIL: Using tmux for Persistent Terminal Sessions

·TIL·1 min read·Luke Oliff

SSH disconnects. Your terminal session dies. Long running processes stop. tmux keeps them alive regardless of your network connection.

tmux new -s audio-processing

Starts a named session. Run your long running process inside it. Detach with Ctrl+B then D.

tmux attach -t audio-processing

Reconnect from anywhere. The session is still running with all output visible.

tmux list-sessions

Show all running sessions.

Can I scroll in tmux?

Ctrl+B then [ enters scroll mode. Use arrow keys or Page Up/Page Down to scroll through output history.

Does tmux support split panes?

Yes. Ctrl+B then % splits vertically. Ctrl+B then “ splits horizontally.