telnet or ssh telnet to Linux, if the connection is not normal interruption, reconnect, the system will open a new session, unable to restore the original Session.screen command can solve the problem. The screen tool is an end-multiplexer, in essence, which means you can run multi-terminal applications using a single terminal window.
Syntax
screen [-amrvx-ls-wipe][-d < job name >][-h < number of rows >][-r < job name >][-s][-s < job name;]
Additional notes:
Screen is a multiple Windows management program. The so-called window, refers to a full-screen text mode screen. Screen programs are often used only when Telnet is used to log on to the host computer or when using an old-fashioned terminal.
Parameters
-A adjusts all windows to the current size of the terminal.
-D < Job name > take the specified screen job offline.
-H < number of rows > specifies the number of buffer rows in the window.
-M forces a new screen job to be established even if the screen job is currently in operation.
-R < Job name > Restore offline screen jobs.
-R first attempt to recover the offline job. If you cannot find an offline job, create a new screen job.
-s Specifies the shell to execute when a new window is created.
-S < job name > Specifies the name of the screen job.
-V Displays version information.
-X the screen job is offline before recovery.
-ls or--list displays all of the current screen jobs.
-wipe checks all current screen jobs and removes screen jobs that are not already available.
Common screen Parameters:
Screen-s Yourname, a new session called Yourname
Screen-ls, List all current session
Screen-r yourname, back to yourname this session
screen-d yourname, remote detach a session
Screen-d-R Yourname End the current session and return to the session Yourname
Under each screen session, all commands start with Ctrl + A (C-A).
C-a? Help, show simple instructions
C-a C-Create to open a new window
C-a N-Next, switch to next window
C-a P--Previous, previous window
C-a 0..9, switch to the first 0..9 window
CTRL + A [Space], from the Windows 0 to the video window 9
C-a c-a, switching between the two most recently used Windows
C-a x, lock the current window and unlock it with the user's password
C-a D-Detach, temporarily leave the current session, the current screen session (may contain multiple windows) to the background to execute, and will return to the status of not yet in screen, at this time in the screen session every The process (either foreground/background) that runs within a window continues to execute, even if the logout is not affected.
C-a Z, put the current session in the background, and use the Shell's FG command to go back.
C-a W-Windows, lists the windows that are turned on that have those
C-a T-time, showing the current times, and the system's load
Kill window, C-a K, forcibly closes the current window
c-a [, enter copy mode, can be rolled back, searched, copied in copy mode as if using VI
C-b Backward,pageup
C-f Forward,pagedown
H (uppercase) high, move the cursor to the upper-left corner
L Low, move the cursor to the lower left corner
0 move to the beginning of the line
$ End of line
W forward one word, move forward in words
b Backward One word, move backward in words
Space is first pressed as the starting point for the marked area, and the second press is the end point
ESC ends Copy Mode
C-A], Paste, paste the content you just selected in copy mode
GNU Screen Command