Sonus recommends Screen usage when you work remotely on a server, especially during install, upgrade or migration activities.
The Screen utility allows you to:
- Use multiple shell windows from a single SSH session.
- Keep a shell active during network disruptions.
- Disconnect and re-connect to a shell sessions from multiple locations.
- Run a long running process without maintaining an active shell session.
- Copy-and-Paste text between windows and so on.
All windows run their programs completely independent of each other. Whatever you type is sent to the program running in the current window. To initiate the command, use Ctrl + a. This is usually followed by another keystroke depending on what you want to do using screen.
For more information on the Screen Utility, see http://www.gnu.org/software/screen/manual/screen.html
Installing the screen
screen-4.0.3-4.el5.x86_64.rpm file (only in case of RedHat 5.x releases) from the LINTEL_PLATFORM area of Sonus SalesForce Customer Portal. Copy the downloaded
.rpm file into
/tmp directory of the Linux server.
The Screen utility is installed by default in RedHat 6.x and later.
To check if Screen is installed in your Linux system, execute the following command:
The Screen utility is available by default under
Starting Linux Screen
Execute the following command to start screen:
The Screen uses the Ctrl + a command to send commands to screen instead of the shell. The following command are used in combination with the Ctrl + a command:
Ctrl + a ?
To lists the
|Creating new window|
Ctrl+ a c
|To creates a new window with your default prompt.|
|Creating window title||Ctrl+ a A|
To assign the screen window with a title.
Enter the screen window name as Scr1
|Switching between windows||Ctrl+ a n||To switch to the next window.|
|Ctrl+ a p|
To switch to the previous window.
To switch to screen window number 0 to 9.
Example: Crtl +a
|Detaching from screen||Ctrl+ a d|
To detach from a window and reattach later.
|Reattach to screen|
To re-attach to your detached screen, execute this command.
If you have multiple screens you may get this:
|Logging screen outputs||Ctrl+ a h|
To creates a running log of the session to the file "hardcopy.n" file (where n is the number of the current window).
The hardcopys are dumped in screen's current working directory.
|Getting alerts ||Ctrl+ a m|
To monitoring a window for activity.
If you are waiting for output from a long running program, you can use Ctrl + a M to look for activity. Screen will then flash an alert at the bottom of the page when output is registered on that screen.
If you are downloading a large file or compiling a program, you can be notified when there is no more output.
|Locking screen session||Ctrl+ a x|
To lock your screen session. This requires a password to access the session again.
To exit and close screen utility, execute this command.
|Kill the screen||Ctrl+ a k|
To kill and exit the screen utility.