Linux screen command keeps programs away from off-grid effects

Source: Internet
Author: User
Tags sessions

Powerful screen commands in Linux 2008-12-02 21:53 a "Baby" was discovered today, the Linux screen command, which not only provides a nohup-like feature for remote logins, but also provides the "multiple desktops" feature I like very much.   Normally open a putty telnet, often need to switch back and forth between two programs, what to do? Ctrl-z and FG, BG? These are too much trouble. In fact, we can use the screen command to achieve easy and convenient switching.   I mainly refer to the following two articles (attached to the end), I summed up the method is:   "first with the screen [-s] command to establish a session, and then you can set up in this session multiple window." Use screen [-s] to create multiple sessions, and each session can create multiple windows. You can switch between different windows with commands such as Ctrl-a n/p. If you want to switch between sessions, you need to ctrl-a D back to the login session (like the root of a big tree), and then use the SCREEN-LS to see what session you have, then using SCREEN-R to decide which session to revert to. For already attached session can not direct screen-r, need first screen-d, then can Screen-r "   " Reprint 1 "  The system administrator often needs to telnet to the server and run some programs on the server for a long time (more than 12 hours) This is if the program does not end to quit Remote Management Terminal remote running program is likely to be used as the usual solution is to use the command Nohup but Nohup also have a lot of problems when the screen this It's all gone. Typing command screen creates a single window running the shell where you can run the program you need and then CTRL + A to exit the window you just created (back to the environment before screen) Then click on the command screen to create a new terminal window so you can build multiple windows with shells (these windows can run your own app) so that you exit the Remote Administration window (the environment into screen) The window of your screen window will not be closed inside running application naturally will not be used Screen-ls can see all screens sessions with screen-r SessionID can go into the SessionID specified Session Last Screen SESsion is no longer in use Screen-r SessionID go in exit unix/linux Tools: Screen command using screen is very easy to use with screen. Just type screen in the shell, To open a screen session. Under each screen session, all commands start with Ctrl + A (C-A). Now let me briefly introduce the basic commands c-a C, Create, open the new windowc-a N-Next, switch to the next windowc-a P-Previous, the previous windowmore.  less. C-a c-a and other, switch to the 1th in Windows Two window, C-a W, List of Windows that are turned on, and those c-a 0, switch to No. 0 windowc-a 1..9. 9 Windowc-a A, c-a, in Emacs, VE, bash, tcsh can be moved to the beginning C-a T-time, display the current times, and the system's Loadc-a K (uppercase), kill window, force off Close the current windowc-a [, enter copy mode, in copy mode can be rolled back, search, copy, as with the use of VI c-b backward,pageupc-f FORWARD,PAGEDOWNH (uppercase) high, the light To the upper left L low, move the cursor to the lower left corner 0 move to the beginning of the line

Linux Screen command keeps the program away from network breaking effects

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.