Linux tips: use screen to manage your remote sessions

Source: Internet
Author: User
Http://www.ibm.com/developerworks/cn/linux/l-cn-screen/

I have used many of the above descriptions.

The following is a configuration for use.

 

Create a file in the root directory. screenrc

#===================================================== ======================================

#~ /. Screenrc # skip the startup messagestartup_message off # Automatically detach on hangup. autodetach on # If a screen dies, don't freeze the whole screen waiting for it. nonblock on # UTF-8 is necessary. # defutf8 on # Change default scrollback value for new windows: scrollback 10000 defscrollback 10000 # start with visual bell as defaultvbell off vbell_msg "Bell on % t (% n) "## display the window list and clock hardstatus in the latest row Onhardstatus alwayslastline # hardstatus string "% {. bW} %-w % {. rY} % n % t % {-} % + w % = % {.. g} % H (% l) % {.. y} % Y/% m/% d % c: % s "hardstatus string" % {. bw} %-w % {. ry} % n % t % {-} % + w % = % {.. g} % H (% l) % {.. y} % Y/% m/% d % c "# hardstatus string" % {. bW} %-w % {. rY} % n % t % {-} % + w % = % {.. g} "# hardstatus string" % {. bW} %-w % {= rY} % 50> % n % t % {-} % + w % <"# disable the error message vbell off # default windows Startup predefine two windows: screen-t shell 0 screen-t vim 1 #### press C Trl-Z w or Ctrl-Z Ctrl-W display window list bind w windowlist-B # bind ^ w windowlist-B ### define the function key of screen As Ctrl-Z. Press Ctrl-Z when entering Ctrl-Z into the terminal. # Escape ^ Zzbindkey-k k5 screen # F5 create bindkey-k k6 title # F6 change name

Bindkey-k k9 detach # F9

Bindkey-k F1 prev # F11 F12 switchover

Bindkey-k F2 next #

#===================================================== ============================

Screen-ls lists the sessions currently in use

Screen-r sessionid connection session

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.