three, Screen command use method.
1, the use of common methods
To solve the problems that the article began to meet, for example, when installing LNMP. 1.1 Creating a screen session
You can do it first:screen-s lnmp , Screen creates a session with the name LNMP. VPS Detective http://www.vpser.net/ 1.2 leave temporarily, keep a task or program in the screen session
When you need to leave temporarily (the program in the session is not closed and still running) you can restore the screen session by using the shortcut key CTRL + A (that is, hold down CTRL and then press A,D) 1.3
You can perform execution again when you return:screen-r lnmp can revert to the working interface of the LNMP session that was created before leaving. If you forget, or you did not specify a session name, you can perform:screen-ls Screen lists the currently existing sessions, as shown in the following figure:
11791.LNMP is just the screen created LNMP session, has temporarily exited the LNMP session, so the status of detached, when the use of Screen-r LNMP state will become attached, 11791 is the process ID for this screen session, which can also be used when resuming a session:screen-r 11791 1.4 shut down screen
Execution:exit , will prompt: [terminating] indicates that the screen session has been successfully exited. VPS Detective http://www.vpser.net/ 2, remote demo
First, the presenter executes screen-s test on the server to create a screen session where the audience can link to the remote server to perform screen-x test and the presenter will appear synchronized with the viewer on-screen. 3, the common shortcut key
CTRL + A C: Create a window in the current screen session
CTRL + A W: List of Windows
CTRL + A N: Next window
CTRL + A P: Previous window
CTRL + a 0-9: Toggle between window No. 0 and 9th windows