
tmux拆分终端
Tmux is great tool which saves system administrators from a lot of unnecessary workloads. Tmux is creating multiple screens, split current screen and maybe the best part even ssh is closed it resumes to work and after reconnect we can resume from where we were.
Tmux是一个很棒的工具,可以节省许多不必要的系统管理员的工作量。 Tmux正在创建多个屏幕,拆分当前屏幕,也许最好的部分甚至在ssh关闭时也可以恢复工作,重新连接后,我们可以从原来的位置恢复。
打开Tmux (Open Tmux)
We will start tmux terminal emulator simply providing it to bash. We will see a screen like below. We can see that there is a bar below the screen which provides some information like the window list, active window, hostname, time and date.
我们将启动tmux终端仿真器,仅将其提供给bash。 我们将看到如下屏幕。 我们可以看到屏幕下方有一个栏,提供一些信息,例如窗口列表,活动窗口,主机名,时间和日期。

控制快捷方式 (Control Shortcut)
During the usage of the tmux terminal, we will use a control keyboard shortcut in order to create new windows, split them. This is CTRL+B .
在使用tmux终端的过程中,我们将使用控制键盘快捷键来创建新窗口,并将其拆分。 这是CTRL + B。
CTRL+B
水平拆分Tmux屏幕 (Split Tmux Screen Horizontally)
We will split tmux screen horizontally and create new work windows. We will use CTRL+B and after % . As we know CTRL+B is default function tool
我们将水平分割tmux屏幕并创建新的工作窗口。 我们将在%之后使用CTRL + B。 众所周知, CTRL + B是默认功能工具
CTRL+B %

垂直拆分Tmux屏幕(Split Tmux Screen Vertically)
Similar to the previous example but the split will occur vertically. The cursor will move to the newly created tmux window.
与前面的示例类似,但拆分将垂直发生。 光标将移至新创建的tmux窗口。
CTRL+B "

创建新的Tmux窗格(Create New Tmux Pane)
We will create a new pane next to the current pane. We can see below in the status bar there is 3 panes named with bash and numbered as 1, 2 and 3.
我们将在当前窗格旁边创建一个新窗格。 我们可以在状态栏中看到下面的三个窗格,分别以bash命名,分别编号为1、2和3。
CTRL+B c

导航到上一个窗口(Navigate To The Previous Window)
We can navigate with p and n keys
我们可以用p和n键导航
CTRL+B p will naviagte to previous windows
CTRL+B n will navigate to next window
杀死窗格 (Kill Pane)
To kill a tmux pane CTRL+B x
key combination is used. We will be asked the question “kill-pane 0”. We have to answer with y
which means yes to kill currently active pane.
要杀死tmux窗格,请使用CTRL+B x
组合键。 我们将被问到“ kill-pane 0”问题。 我们必须用y
回答,这意味着要杀死当前活动的窗格。

翻译自: https://www.poftut.com/split-create-close-tmux-screen-linux/
tmux拆分终端