Simple instructions on using the screen command, simple use of the screen command
First, use the screen [-S] command to create a session, and then you can create multiple windows in this session. You can use screen [-S] to create multiple sessions, and each session can create multiple windows. You can use Ctrl-A n/p or other commands to switch between windows. To switch between multiple sessions, You Need To Ctrl-A d to log on to the session (like the root of A big tree), and then check which sessions are available through screen-ls, then, use screen-r to determine the session to be restored. Screen-r is not allowed for Attached sessions. You must first screen-d before screen-r and exit with exit.
1. Create a session
Screen-S hzy
2. Return to the logon session
Ctrl + a + d
3. view the created session List
Screen-ls
1 [root@martin ~]# screen -ls2 There is a screen on:3 23468.hzy (Detached)4 1 Socket in /var/run/screen/S-root.
4. restore to the specified session (Detached)
Screeb-r pid
1 [root@martin ~]# screen -r 23455
5. restore to the specified session (Attached)
Screen-d
Screen-r pid
6. open a new window in the session
Ctrl + a + c
7. Switch the window, the next one, and the last one (you can press ctrl first, and then press a and n/p. xshell can see the difference in the label bar on the top)
Ctrl + a + n
Ctrl + a + p
8. Exit
Exit
Reference: http://www.cnblogs.com/xupeizhi/archive/2013/05/20/3088779.html