'screen'에 해당되는 글 2건

  1. 2013.06.14 screen
  2. 2012.10.16 screen 명령어


툴/일반 2013.06.14 16:08


- 스크린에 대한 짤막한 레퍼런스 

screen Quick Reference

Getting in

start a new screen session with session namescreen -S <name>
list running sessions/screensscreen -ls
attach to a running sessionscreen -r
… to session with namescreen -r <name>
the “ultimate attach”screen -dRR (Attaches to a screen session. If the session is attached elsewhere, detaches that other display. If no session exists, creates one. If multiple sessions exist, uses the first one.)
detach a running sessionscreen -d <name>

Escape key

All screen commands are prefixed by an escape key, by default C-a (that's Control-a, sometimes written ^a). To send a literal C-a to the programs in screen, use C-a a.

Getting out

detachC-a d
detach and logout (quick exit)C-a D D
exit screen“C-a : quit” or exit all of the programs in screen.
force-exit screenC-a C-\ (not recommended)


See helpC-a ? (lists keybindings)

The man page is the complete reference, but it's very long.

Window Management

create new windowC-a c
change to last-visited active windowC-a C-a (commonly used to flip-flop between two windows)
change to window by numberC-a <number> (only for windows 0 to 9)
change to window by number or nameC-a ' <number or title>
change to next window in listC-a n or C-a <space>
change to previous window in listC-a p or C-a <backspace>
see window listC-a " (allows you to select a window to change to)
show window barC-a w (if you don't have window bar)
close current windowClose all applications in the current window (including shell)
kill current windowC-a k (not recommended)
kill all windowsC-a \ (not recommended)
rename current windowC-a A

Split screen

split display horizontallyC-a S
split display verticallyC-a | or C-a V (for the vanilla vertical screen patch)
jump to next display regionC-a tab
remove current regionC-a X
remove all regions but the current oneC-a Q


send a command to a named sessionscreen -S <name> -X <command>
create a new window and run ping example.comscreen -S <name> -X screen ping example.com
stuff characters into the input buffer
using bash to expand a newline character
(from here )
screen -S <name> [-p <page>] -X stuff $'quit\r'
a full example
# run bash within screen
screen -AmdS bash_shell bash
# run top within that bash session
screen -S bash_shell -p 0 -X stuff $'top\r'
# ... some time later
# stuff 'q' to tell top to quit
screen -S bash_shell -X stuff 'q'
# stuff 'exit\n' to exit bash session
screen -S bash_shell -X stuff $'exit\r'


redraw windowC-a C-l
enter copy modeC-a [ or C-a <esc> (also used for viewing scrollback buffer)
pasteC-a ]
monitor window for activityC-a M
monitor window for silenceC-a _
enter digraph (for producing non-ASCII characters)C-a C-v
lock (password protect) displayC-a x
enter screen commandC-a :
quick_reference.txt · Last modified: 2013/05/31 16:24 by · Currently locked by: 15.195.185

' > 일반' 카테고리의 다른 글

screen  (0) 2013.06.14
Launchy  (0) 2013.04.11
FreeNX : VNC을 대신할 RemoteDesktop (번외 eclipse 속도 tip)  (0) 2012.11.08
tightvnc에서 텍스트 복사/붙여놓기  (0) 2012.11.02
Posted by 라판
TAG screen

  • linux command 'screen' - 터미널 에뮬레이션으로 하나의 터미널에서 여러 개의 스크린을 사용할 수 있다. 터미널이 종료되어도 세션은 계속 유지되어, 다른 터미널에서도 해당 세션에 다시 attach할 수 있다.
    • screen 생성 : screen,
    • screen 이동 : screen -X prev[next]
    • screen 종료 : screen -d
    • 현재 창 종료 : screen -X kill
    • screen 목록 확인 : screen -list or -ls
이전처럼 여러 터미널을 띄어가며, 창을 옮겨다니는 수고는 더 이상 안해도 된다. 
아, 정말 리눅스는 무궁무진하구나. 

참고로 첨부파일은 리눅스 screen의 설정파일.(root에 두고 사용) 

'리눅스 > 일반' 카테고리의 다른 글

Redirection  (0) 2012.10.18
cpu 갯수 확인하기  (0) 2012.10.16
screen 명령어  (0) 2012.10.16
리눅스에서 이전 폴더로 이동하기  (0) 2012.03.30
find 와 grep를 이용한 파일/문자열/디렉터리 찾기 및 치환  (0) 2012.02.02
ANSI color  (0) 2011.12.20
Posted by 라판