A Basic Understanding Of screen On Centos |

系统 2071 0

A Basic Understanding Of screen On Centos | CentOS Help

A Basic Understanding Of screen On Centos

Screen allows you to run scripts or commands in their own virtual window within the terminal, essentially allowing you to have a terminal multi-tasking environment where you can switch between your windows or another users at will. This howto will give you the basics of screen plus some other useful features that may help you in your daily administration tasks. This howto is intended to get you up and running with basic screen functionality within just a few minutes. Please read the manpage for a far more in-depth description of features and options.

 

Applicable to Centos Versions:

  • Centos 5.x

Requirements

Explanation of requirements.

 

  1. Root or appropriate sudo access to the system.

Doing the Work

Basic description of what will be done and what is expected.

  1. Install screen if it’s not already installed:
  2.             yum install screen
    
              
  3. Setup screen for multi-user mode:
  4.             Multi-user mode is helpful for teaching something in realtime because multi-user mode allows 1 or more people observe another performing commands
    or other system maintenance, or it could allow more than one user access to the status of scripts or custom commands running in separate screens.
    
    
                
                  setuid the screen binary:
                
                
    chmod u+s /usr/bin/screen
    
    
                
                  Edit /etc/screenrc and add this at the top:
                
                
    ###Multi-user Mode###
    multiuser on
    acladd username
    aclchg username
    acldel username
    ###End Multi-user Mode###
    
              
  5. Useful screen commands:
  6.             
                  List a particular users screen sessions:
                
                
    screen -list username/ (
                
                  the forward slash is important
                
                )
    
    
                
                  List your own active screen sessions:
                
                
    screen -ls
    
    
                
                  Re-attach to a specific users screen and session:
                
                
    screen -x username/shared-session
    
    
                
                  Start a screen session and give it a unique name:
                
                
    screen -S somename
    
    
                
                  Detach from a running screen session leaving it running in the background:
                
                
                  Hit the key combination:
                
                 Control + A/a + D/d (
                
                  not case sensitive
                
                )
    
    
                
                  Re-attach to a specific screen you've named:
                
                
    screen -R somename
    
    
                
                  Power detach a screen that you are logged into from another location:
                
                
    This is helpful if you've been accidentally disconnected from ssh while in a remote screen session and it's still attached.
    screen -D somename
              

A Basic Understanding Of screen On Centos | CentOS Help


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论