Screen called a full-screen window manager, he can easily get multiple virtual terminal effects on a physical terminal.
Screen function Description:
in simple terms, Screenis a window manager that can multiplex a physical terminal across multiple processes,This means that you can use a single terminal window to run multi-terminal applications. ScreenThe concept of a session in which a user can Screenin a session, create multiple Screenwindow, in each of the Screenwindow is like manipulating a realTelnet/sshConnection window.
Screen command syntax:
screen[-amrvx-ls-wipe][-d < >][-h < >][-r < >][-s][-s <;]
ScreenCommand parameters:
-A-[r| R]adjust all windows to the current size of the terminal.
-C filenamewith the specifiedfilenamefile Substitution Screenthe configuration file'. SCREENRC '.
-d [Pid.tty.host]Disconnect ScreenProcess(When you use this command, Screenthe state must beattached, which means that there are users connected to Screenin). The name of the general process isPid.tty.hostthis form represents(withscreen-listcommand to see the state).
-d [Pid.tty.host]with the- Dcommand to implement the same function, the difference is that if the execution succeeds, it will kick off the original Screenthe user and let himLogout.
-H < > Specifies the number of buffer rows in the window.
-lsor–listshows all the current Screenjob.
-Meven if you are currently in the job Screenjob, still forcing the creation of a new Screenjob.
-p number or nameSelect a window in advance.
-R [Pid.tty.host]Recovery of offline Screenprocess, if there are multiple disconnected processes, you need to specify[Pid.tty.host]
-Rtry to recover the offline job first. If you cannot find an offline job, create a new Screenjob.
-sshellspecifies what to do when a new window is created.Shell.
-S < >Specify Screenthe name of the job. (used to replace[Pid.tty.host]the naming method,can simplify operations).
-VDisplays version information.
-wipeCheck all the current Screenjob, and remove the unused Screenjob.
-Xbefore recovery is offline Screenjob.
Screen general usage of commands :
screen-d-R: Connect a Screen process, if the process is attached , you can first kick off the remote user and then connect.
screen-d-R: connect a screen process, if the process is attached logout re-connect
screen-ls or -list: Displays the existing screen process, common commands
screen-m: If in a screen process, with shortcut keys crtl+a c or just hit screen You can create a new window ,screen-m You can create a new screen process.
SCREEN-DM: Create a new Screen , and the default is detached mode, which is not connected when built.
screen-p number or name: Select a window in advance.
Screen simple steps to implement a background run program :
[Email protected] ~]# yum-y Install screen
1< to do something, first use the command to create a Screen :
[email protected] ~]# screen-s test1
2<then you can do it inside, and if your task is not finished, go away and use the command to keep Screen:
[email protected] ~]# Ctrl+a+d #PressCtrl + A, and then pressDcan be retainedScreen
[Detached] #This will show this prompt, indicating that it has been retained. Screenthe
If you've done your job, just type it directly . :
[[email protected] ~]#exit # That means it's a successful exit.
[Screen is terminating]
3< If you've kept it for the last time Screen , you can use the command to view:
[email protected] ~]#Screen-ls
There is a screens on:
9649.test1 (Detached)
Recovery Screen , use the command:
[[email protected] ~]# screen-r test1 (or 9649)
This article is from the "Linux" blog, so be sure to keep this source http://wandiankafei.blog.51cto.com/10878910/1714466
Linux under Full Screen window manager screens