安装
yum install screen -y
运维A
cp /etc/screenrc ~/.screenrc
修改 vi .screenrc
启用多窗口功能,取消以下选项前的注释
caption always "%{wk}%?%-Lw%?%{bw}%n*%f %t%?(%u)%?%{wk}%?%+Lw %=%{mk}@%H %{yk}%D %{ck}%M%{wk} %{ck}%d %{gk}%c"
建立一个处于断开模式下的会话,并根据我们的需要指定其会话名称。
screen -dmS training
进入指定会话,这里就是training
screen -r training
运维B
运维A可以开始操作,实时展现,并且两边都可以操作
screen -x training
临时退出去 CTRL+A+D
$ screen -list There is a screen on: 17698.training (Attached) 1 Socket in /var/run/screen/S-root.
重新进来
screen -x training