创建screen帮助会话
一.screen使用方法
创建新screen会话
screen –S [SESSION]
加入screen会话
screen –x [SESSION]
退出并关闭screen会话
exit
剥离当前screen会话
Ctrl+a,d
显示所有已经打开的screen会话
screen -ls
恢复某screen会话
screen -r [SESSION]
二.简单举例
首先创建一个screen会话。
[root@centos6 ~]#screen -S help
[root@centos6 ~]#
显示已创建screen会话。
[root@centos6 ~]#screen -ls
There is a screen on:
2827.help (Attached)
1 Socket in /var/run/screen/S-root.
[root@centos6 ~]#
切换终端进入创建好的screen会话
root@centos6 ~]#screen -x help
[root@centos6 ~]#
两个终端显示结果同步。
[root@centos6 ~]#ls
123 Documents ensp; install.log.syslog Public
anaconda-ks.cfg Downloads Music Templates
Desktop install.log Pictures Videos
[root@centos6 ~]#pwd
/root
[root@centos6 ~]#^C
[root@centos6 ~]#
如下图。
剥离当先会话Ctrl+a,d
退出关闭会话exit.
转载于:https://blog.51cto.com/yy1109lll/2296513