Monday, June 15, 2015

screen introduction

screen introduction

screen set up guide.

a. First copy screen program on your home directory.
b. Add following on your PATH,
PATH=$PATH:/usr/sbin:/export/home/kbhusal;export PATH

Note: install cygwin on your PC and use XWinserver to login to the server where you have screen..

1. CTRL+a; press c to create a new window..

again ctrl +a; c  [ note: first type Ctrl-a and then type c ]

2. To get a full-screen list of windows.
Note: You can navigate this list with arrow key or vi style j (down) and k (up) to pick (high light) a window. To activate it by pressing the enter key. 

CTRL a; shift " (double quote)
CRTL a; w - gives you on line small non-interactive list of windows.

3. To go to the previous session:

CTRL a;  p

4. Switch between the windows (sessions).
 To go to the next window

CTRL a; n - for next windows in the list by number.
CTRL a; p - for previous window.
CRTL a; N - to switch between numbers from 0 to 9 numbered corresponding window.

5. To rename the window session:

ctrl a; shift a (type CTRL+a; A - upper case a) and remove the old entry using backspace key and type the server name.

6. In case if you close the window accidently, to reattach previous sessions:

screen -r <PID>

7. To kill a misbehaving program,

8. Detaching and reattaching: the magic of terminal decoupling

a. To detach the window from the session window,
press CTRL -a d

b. To detach, 
just close the terminal emulator that contains the session.

Note: In reality all the session will be active. They are unbind the session from the current terminal. All the program within the screen are still running.

9. Copying, pasting, and the scrollback buffer

No comments:

Post a Comment