Screen is one of the powerful command in Linux(Unix System) that allow user to run command in remote mode and this is to avoid connection timed out or etc issue causing the previous launched command stopped.
You may install screen by running yum or apt-get depending on your box, then you can start screen by typing screen at the command prompt.
Once screen session has started, you can use the following commands to mess around:
– Ctrl + A + ‘c’ = To open a New Windows
– Ctrl + A + ‘n’ = next window (if you have multiple windows running)
– Ctrl + A + ‘0…9’ = go to window number x where it should come with 0 to 9.
– Ctrl + A + ‘d’ = detach from a window. Say, if you want to close your session and return later.
– Ctrl + ‘d’ = detach and clear the screen session,
To re-attach to a screen, you may need to check the number of screen is running.
This will display the screens currently running, you could run the command as below to resume the screen session.
[code]$ screen -x pid.tty.user[/code]