tmux
Sessions that survive disconnects, windows, panes and the default key bindings.
Sessions
New named session
tmux new -s <session>
List sessions
tmux lsAttach to a session
tmux attach -t <session>
Attach or create if missing
tmux new -A -s <session>
Kill a session
tmux kill-session -t <session>
Detach from the session
Ctrl+b dThe session keeps running — you can close SSH and come back later.
Windows
New window
Ctrl+b cNext / previous window
Ctrl+b n / Ctrl+b pGo to window by number
Ctrl+b 0…9Rename window
Ctrl+b ,Pick a window or session from a list
Ctrl+b wPanes
Split vertically (side by side)
Ctrl+b %Split horizontally (one above the other)
Ctrl+b "Move between panes
Ctrl+b ←↑→↓Zoom a pane to full screen and back
Ctrl+b zClose a pane
Ctrl+b xScrolling and settings
Scroll mode (q to exit)
Ctrl+b [Enable the mouseadvanced
echo 'set -g mouse on' >> ~/.tmux.conf && tmux source-file ~/.tmux.confType in all panes at onceadvanced
tmux setw synchronize-panes on