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会话。

[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 ~]#

  如下图。

screen会话建立

  剥离当先会话Ctrl+a,d

screen会话建立

  退出关闭会话exit.

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值