当前位置:   article > 正文

screen会话建立

虚拟环境中用screen 创建会话

   创建screen帮助会话

一.screen使用方法

  创建新screen会话

  screen –S [SESSION]

  加入screen会话

  screen –x [SESSION]

  退出并关闭screen会话

  exit

  剥离当前screen会话

  Ctrl+a,d

  显示所有已经打开的screen会话

  screen -ls

  恢复某screen会话

  screen -r [SESSION]

二.简单举例

  首先创建一个screen会话。

  1. [root@centos6 ~]#screen -S help
  2. [root@centos6 ~]#

  显示已创建screen会话。

  1. [root@centos6 ~]#screen -ls
  2. There is a screen on:
  3. 2827.help (Attached)
  4. 1 Socket in /var/run/screen/S-root.
  5. [root@centos6 ~]#

  切换终端进入创建好的screen会话

  1. root@centos6 ~]#screen -x help
  2. [root@centos6 ~]#

  两个终端显示结果同步。

  1. [root@centos6 ~]#ls
  2. 123 Documents ensp; install.log.syslog Public
  3. anaconda-ks.cfg Downloads Music Templates
  4. Desktop install.log Pictures Videos
  5. [root@centos6 ~]#pwd
  6. /root
  7. [root@centos6 ~]#^C
  8. [root@centos6 ~]#

  如下图。

screen会话建立

  剥离当先会话Ctrl+a,d

screen会话建立

  退出关闭会话exit.

转载于:https://blog.51cto.com/yy1109lll/2296513

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/708440
推荐阅读
相关标签
  

闽ICP备14008679号