tmux 简单使用

2015-05-24  本文已影响38人  myang199088
  1. install tmux in ubuntu
    ~$ sudo add-apt-repository ppa:pi-rho/dev ~$ sudo apt-get update ~$ sudo apt-get install tmux

  2. tmux basic usage
    ~$ tmux ~$ tmux -V # check version info.

to split the window in “left:right”, just type:

~$ CTRL B %

to split the window in “top:bottom”, just type:

~$ CTRL B "

to change the current working pane, just type:

~$ CTRL b <directory arrow> # up, down, left, right

to toggle the current working pane full-screen, just type:

~$ CTRL+b z

to create a new tmux window, just type:

~$ CTRL+b c

to toggle with the windows created by tmux, just type:

~$ CTRL+b <window_number> # 0, 1, 2, ...., 9

move to the (n)ext window:
~$ Ctrl+b n

move to the (p)revious window:
Ctrl+b p

Ctrl+B 然后在按 "w",然后使用箭头来移动到你需要的会话,然后在回车,就可以切换到相应的会话中

要从会话脱离,可以按下 Ctrl+B 后接着按 "d" 。将脱离所有的会话返回原来的终端屏幕。
如果要恢复脱离的会话,您可以输入如下命令来恢复:
[root@server ~]# tmux attach

上一篇 下一篇

猜你喜欢

热点阅读