$title = "Online Help: Unix: Unix Command: Screen"; include("common-header.inc"); ?>
|Ctrl-a c||Create a new screen|
|Ctrl-a k||Terminate the current screen|
|Ctrl-a w||List all screens|
|Ctrl-a d||Detach current screen|
Here's an exmaple:
Let's say a user, Oski, wants to run Matlab in the background on the machine makalu. Oski will first ssh to makalu, then start screen. Next, he will simply issue the Matlab command with no GUI (i.e. /usr/bin/nohup matlab-nogui < inputfile > outputfile). Oski's Matlab job should start to run and he should see some output being displayed on screen.
Now, Oski needs to go to class and cannot leave his computer connected. He can detach the screen and log out while the job continues to run. To do that, Oski will issue the detach current screen command:
Ctrl-a dNow, Oski has detached the screen session he was using. The Matlab job is still running on the server. But now, Oski can disconnect his computer from the server, and head to class.
Now, Oski has a chance to go back to his Matlab job, he simply ssh back to makalu, and issues the following command to see all the screens that are running:
screen -listOski should see:
There is a screen on: 19494.pts-5.makalu (Detached) 1 Socket in /tmp/uscreens/S-oski.It is showing that Oski is having 1 detached screen (with PID 19494) running on makalu.
Now, Oski wants to re-attach the detached screen to track his Matlab job, he simply issues:
screen -r 19494Oski will then resume his Matlab job screen and with the output being display on screen.
To see more commands available within the screen manager, issue: