Toolserver:Screen

  provides a persistent "virtual terminal" that you can run command-line programs in. This avoids the problem where you log off, or your session is interrupted for some reason, and all the programs you were running exit. If you run the programs under screen, you can simply detach the screen session, log off, then reconnect later and attach it to get your programs back.

Note: while it's possible to start a tool under  and leave it running, this is not the right way to start tools. Once you've got the hang of using screen, see job scheduling#Running jobs under screen to see how to submit -based jobs.

Quick-start
Log in to a terminal on one of the login servers.

Type $ screen at a terminal. You will get a new shell prompt, running inside screen. Now run your program here. When you want to log off, type   to detach screen. You will see: [screen detached] and you're back at the old shell prompt. Now log off; your programs will continue running in screen's virtual terminal. When you want to get them back, log in again and run $ screen -r This will resume the detached screen.

To terminate a screen session, resume it with   and then press   to kill all windows, or simply exit the shell (by typing  or   at the shell prompt) and screen will exit automatically.

If you run many screen sessions simultaneously, it can be helpful to name them. $ screen -S operation1 To resume such a session: $ screen -r operation1

Other features

 * Opening multiple windows:Type  . A new screen will open.  You can switch between screens with  , where # is the screen to switch to (starting from 0).  All screens under the same session are detached and reattached together.
 * List all open windows:Type  .
 * Start a screen detached:Use  and the screen will start with your command running in it, but will not be attached.

For a detailed overview of screen, see the manual page  .

Always use screen on login
By changing your  to somewhat like you will always reattach to the same screen session (or create a new one if there's no screen running). With  you will detach the screen and log out. Use  or type   to close a screen. With the last screen closed you will log out.

Category:Commands