Linux Common Commands--screen
Open a screen
There will be a screen on the machine, which will be named in the default way:
$screen -ls There is a screen on: 4087.pts-5.jackson-virtual-machine (01/11/2015 05:33:22 PM) (Detached)1 Socket in /var/run/screen/S-jackson.
of which: 4087 is screen id,jackson-virtual-machine is screen name
exit the currentscreen:ctrl+ a + d
PS: after the press ctrl + a , will enter the screen management mode, the input key will be taken to screen, where the screen d is obtained, exit the current screen
Restore the previous exit of screen
$screen -r 4087/pts-5.jackson-virtual-machine -- 输入id和名字都可以
Open a screen of your own command
$screen -S test$screen -lsThere are screens on: 4260.test (01/11/2015 05:46:31 PM) (Detached) 4087.pts-5.jackson-virtual-machine (01/11/2015 05:33:23 PM) (Detached)2 Sockets in /var/run/screen/S-jackson.
Permanently exits a screen
Ctrl + d
Common shortcut keys for screen
Before executing these commands, you must first enterctrl + a
C : Create a new window (create)
n : Skip to next window (next)
P : Skip to previous window (previous)
A : Rename the current window
0..9 : Jumps to nth window
" : Lists all the current Windows
Reference:
- Linux tips: Use screen to manage your remote sessions
- Screen User ' s Manual
Linux Common Commands-screen