Common Sense
Tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time.
Terms:
- Session: A session can have multiple windows.
- Window: A window can have multiple panes. The is mismatch between current understanding of a "window" and the term "window" in tmux, which is more like "tab". A session is more like a window that have multiple tabs.
- Pane: You can split a window into multiple panes.
Master key: Ctrl+B. Inside a tmux session, to navigate around, you will need to press Ctrl+B first before hitting any actual command keys.
Cheat Sheet
Outside Tmux Session
tmux a -t <name>: attach(reconnect) to a tmux session.tmux new -s <name>: new a tmux session with the given name.
Inside a Tmux Session
Hit Ctrl+B first, and then:
N: switch to the next window.P: switch to the previous window.↑/↓/←/→: switch to the pane given by the arrow key.<: rename the current window.%: split the current pane vertically.": split the current pane horizontally.c: create a new window.x: close the current pane.