tool-tmux 发表于 2017-04-22 | session 管理1234567891011121314151617181920211. 新建session tmux new -s session_name 2. 进入session tmux attach -t session_name 3. 切换sessiontmux switch -t session_name4. 列出所有session tmux list-sessions 5. 离开sessiontmux detach (prefix + d)6. 关闭sessiontmux kill-session -t session_name window管理123456781. 新建window tmux new-window (prefix + c)2. 切换windowtmux select-window -t :0-9 (prefix + 0-9)3. 重命名windowtmux rename-window (prefix + ,) pane 管理12345678910111213141516171. 垂直拆分tmux split-window (prefix + ")2. 水平拆分tmux split-window -h (prefix + %)3. 交换tmux swap-pane -[UDLR] (prefix + { or })4. 选择tmux select-pane -[UDLR](prefix + [arrow])5. 最大化当前窗口/还原tmux resize-pane (prefix + z)6. 关闭最大窗口tmux close-pane (prefix + x) 其他1234567891. 加载配置文件tmux source-file .tmux.conf2. 复制 .tmux.confbind [ copy-modebind-key -t vi-copy 'v' begin-selection # Begin selection in copy mode.bind-key -t vi-copy 'V' rectangle-toggle # Begin selection in copy mode.bind-key -t vi-copy 'y' copy-selection # Yank selection in copy mode.bind ] paste-buffer