Terminal split screen tool screen and tmux under Linux

1. Screen split screen ( only up and down split screen, not left and right split screen )

1. Install screen

# 在Ubuntu中
apt-get install screen

# 在CentOS 7以前版本中
yum install -y screen

#在CentOS 8版本中
dnf install -y screen

2. Use tools

       1) Input commands to screenuse tools

       2) Split screen up and down: ctrl + a and then press shift + s

       3) Switch screen: ctrl + a and then press tab

       4) Create a new terminal: ctrl + a and then press c

       5) Close a terminal: ctrl + a and then press x (or directly press exit to exit)

3. Other usage

screen 防止窗口关闭 ,进程不在运行
screen -ls 查看
screen -r 进入正在执行的进程
screen -S help 被帮助者
screen -x help 帮助者(桥接模式)
单独退出 ctrl+a+d

Two, tmux split screen ( either left and right split screen, but also up and down split screen )

1. Install tmux

# 在Ubuntu中
apt-get install tmux

# 在CentOS 7以前版本中
yum install -y tmux

#在CentOS 8版本中
dnf install -y tmux

2. Use tools

       1) Enter the command tmux to use the tool

       2) Split screen up and down: ctrl + b and then press "

       3) Left and right split screen: ctrl + b and then press%

       4) Switch screen: ctrl + b and then press o

       5) Close a terminal: ctrl + b and then press x

       6) Switch between up and down split screen and left and right split screen: ctrl + b and then press the space bar

Three, other

1. 【!】Place the current panel in a new window, that is, create a new window, which only contains the current panel

2. [ Ctrl+Arrow Key ] Move the edge in units of 1 cell to adjust the size of the current panel

3. [ Alt+Arrow Key] Move the edge in units of 5 cells to adjust the size of the current panel

4. [ Spacebar ] You can switch in the default panel layout, try it and you’ll know

5. [   q  ] Display panel number

6. [ Direction keys ] Move the cursor to select the corresponding panel

7. 【{ 】Replace the current panel forward

8. 【}】Replace the current panel backward

9. [ Alt+o ] Rotate the panel of the current window counterclockwise

10. [ Ctrl+o ] Rotate the panel of the current window clockwise

Four, friendship link

tumx detailed user manual     https://louiszhai.github.io/2017/09/30/tmux/

 

Guess you like

Origin blog.csdn.net/l_liangkk/article/details/105154783