Follow this simple and to the point tutorial : https://danielmiessler.com/study/tmux/.
From Bash
- tmux ls –> show list of sessions
- tmux new -s session-name –> new session
- tmux a –> attach to default session
- tmux a -t session-name –> attach to a particular session
- tmux kill-session -t session-name
Session (Ctrl-b)
- $ –> rename session name
- d –> detach
Window (Ctrl-b)
- c –> create new window
- w –> list windows
- n –> next window
- p –> previous window
Panes (Ctrl-b)
- % –> split horizontal
- ” –> split vertical
- arrow keys –> navigate
- q –> pane numbers
- [ –> scroll mode. q to return to normal mode
This is by no means a complete list. Just the commands I tend to use. Figure borrowed from danielmiessler.com
.