tmux
Sessions
Start session
tmux new
tmux new -s mysession
Show sessions
- tmux ls
Kill sessions
tmux kill-session -t mysession
tmux kill-session -a
;kill all sessions but last session
Attach sessions
tmux a
tmux a -t #
tmux a -t mysession
Keyboard
PREFIX: CTRL+b
sessions
- Detach from session: PREFIX + d
- Rename session: PREFIX + $
- Move to previous session: PREFIX + (
- Move to next session: PREFIX + )
Windows
- Create a new window: PREFIX + c
- Rename the window: PREFIX + ,
- Move the window: PREFIX + {window-number}
- Close current window: PREFIX + &
Panes
- Split panes horizontally: PREFIX + "
- Split panes vertically: PREFIX + %
- Switch between panes: PREFIX + Left/Right/Up/Down
Copy Mode
- Enter copy mode: PREFIX + [
- Exit copy mode: q
FAQ
Window 無法固定標題名稱
Solution: ~/.tmux.conf
set-option -g allow-rename off