screen 사용 중에 기본적으로 알아두면 좋은 것들을 요약해보면 다음과 같다.
Useful command-line options
$ screen -d -r; Reattach a session and if necessary detach it
first.
$ screen -D -r; Reattach a session. If necessary detach and
logout remotely first
$ screen -list; list screen
Useful default key bindings (C-a means Ctrl-a)
C-a 0 (select 0)
... ...
C-a 9 (select 9)
C-a - (select -) Switch to window number 0-9, or to the blank window.
C-a A (title) Allow the user to enter a name for the current window.
C-a c
C-a C-c (screen) Create a new window with a shell and switch to that window.
C-a d
C-a C-d (detach) Detach screen from this terminal.
C-a q
C-a C-q (xon) Send a control-q to the current window.
C-a space
C-a n
C-a C-n (next) Switch to the next window.
사용 예:
이제 screen 창에서 작업 가능
screen 사용 중 새로운 screen window를 현재 screen에 추가하려면
이제 screen window 총 2개. 현재 screen window list를 확인해보려면
screen window를 전환하려면
또는
C-a space 또는 C-a n 또는 C-a C-n ; Switch to the next window.
screen window 구분을 쉽게 하기 위해서 title을 설정하려면
이제 작업을 마쳐서 screen 창을 detach하려면
이제 작업하던 screen window는 남아있으니 나중에 attach 해서 사용하면된다.
나중에 기존 사용하던 screen을 불러와서 사용하려면...
또는
$ screen -D -r: Reattach a session. If necessary detach and logout remotely first
이제 기존 screen windows들이 복구되어 작업을 계속할 수 있다.
FAQ:
1. 사용 중 screen window가 key input이 안 될때는
가끔씩 key input이 꼬여 screen window에 key input이 안 될 때까 있는데 이 방법을 쓰면 대부분은 다시 정상으로 돌아온다.
2. screen을 사용할 때 hanterm 또는 xterm과 같은 터미널의 제목(title)이 자동으로 수정하도록 하려면?
예를 들어 home directory에 .screenrc파일에 다음을 추가하면 된다.
위의 예제는 screen number와 screen에서 지정한 title이 출력되도록 한 것이다.
예를 들어 screen에서 지정한 title이 "this is title"이라면, 터미널의 title bar에 "[screen 0: this is title]"과 같이 표시되며 screen 창을 바꾸면 바뀐 현재의 screen의 number와 title로 자동으로 바뀌게 된다.
%n, %?, %t와 같은 것의 의미는 screen man page의 "STRING ESCAPES" chapter를 참고하면 된다.
출처:
사용 경험
GNU screen manual: http://www.gnu.org/software/screen/manual/screen.html
'Soft' 카테고리의 다른 글
| [필수유틸] Total Commander (토탈 커맨더) - 10년이 넘는 기간 동안 필수 유틸 (0) | 2009/06/16 |
|---|---|
| LCD Monitor setting w/ Nokia Moniter Test (노키아 모니터 테스트) (0) | 2009/06/08 |
| [링크] unix / linux 사용자 및 개발자를 위한 문서 (1) | 2009/05/27 |
| SSH Tunneling (0) | 2009/02/27 |
| HanIRC (0) | 2008/12/30 |
| GNU screen (0) | 2008/03/03 |

Prev

