Multiplex several virtual consoles.

基本用法

  • Start a new tmux session: tmux

  • Start a new named tmux session: tmux new -s name

  • List sessions: tmux ls

  • Attach to a session: tmux a

  • Attach to a named session: tmux a -t name

  • Detach from session: Ctrl + B, D

  • Kill session: tmux kill-session -t name

  • Kill session when attached: Ctrl + B, x (then hit 'y' for yes)

分屏操作

  1. 上下分屏:ctrl + b 再按 "
  2. 左右分屏:ctrl + b 再按 %
  3. 切换屏幕:ctrl + b 再按o
  4. 关闭一个终端:ctrl + b 再按x
  5. 上下分屏与左右分屏切换: ctrl + b 再按空格键