常用指令
tmux list-keys
tmux list-commands
tmux info
tmux source-file <file ~/.tmux.conf>
# session
tmux new -s <session_name>
tmux detach
tmux attach -t <session_name>
tmux switch -t <session_name>
tmux kill-session -t <session_name>
tmux rename-session -t <old_session> <new_session>
# window
tmux new-window -n <window_name>
tmux rename-window -t <old_name> <new_name>
# pane
tmux split-window (-h) # vertical or horizontal
tmux swap-pane -U # move up current pane
tmux swap-pane -D # moce down current pane
快捷键
- 创建新窗口:
ctrl-b c
- 切换上一个窗口:
ctrl-b p
- 切换下一个窗口:
ctrl-b n
- 从列表中选择窗口:
ctrl-b w
- 左右划分pane:
ctrl-b %
- 上下划分pane:
ctrl-b "
- 移动光标到其他窗口:
ctrl-b arrow-key
- 关闭pane/window:
ctrl-d
- 上下翻页:
ctrl-b [
然后使用PageUp
/PageDown