SCREEN - The screen program allows you to use multiple windows (virtual VT100 terminals) in Unix. And when you lost connection your sessions are still alive and you can reconnect to them. screen is instaled on maidenhead servers.
Some useful items:
Command Description
screen Start screen session
screen -r Resume your screen sessions (after crash)
Ctrl-a c Create new window (shell)
Ctrl-a k Kill the current window (if this is last window it kills/ends screen)
Ctrl-a w List all windows (the current window is marked with "*")
Ctrl-a 0-9 Go to a window numbered 0-9
Ctrl-a n Go to the next window
Ctrl-a Ctrl-a Toggle between the current and previous window
Ctrl-a [ Start copy mode
Ctrl-a ] Paste copied text
Ctrl-a ? Help (display a list of commands)
Ctrl-a Ctrl-\ Quit screen
Ctrl-a D (Shift-d) Power detach and logout
Ctrl-a d Detach but keep shell window open
Press the Spacebar or Enter to end a command.
Problem:You can't re-attached to the session: screen -r
There is a screen on:
14426.pts-3.data4 (Attached)
There is no screen to be resumed.
Solution: Screen -list
This will display a list of your current screen sessions. For instance, if you had one attached and one dead screen, you would see:
There are screens on:
25542.pts-28.hostname (Dead ???)
1636.pts-21.hostname (Attached)
Remove dead screens with 'screen -wipe'.
2 Sockets in /tmp/screens/S-username.
To detach an attached screen, enter:
screen -D
If you have more than one attached screen, you can specify a particular screen to detach. For example, to detach the screen in the above example, you would enter:
screen -D 1636.pts-21.hostname
Once you've done this, you can resume the screen by entering the screen -r command.
source:
http://kb.iu.edu/data/acuy.htmlman screen