{"id":1416,"date":"2021-03-19T10:32:54","date_gmt":"2021-03-19T01:32:54","guid":{"rendered":"https:\/\/ahnbk.com\/?p=1416"},"modified":"2021-03-19T10:37:24","modified_gmt":"2021-03-19T01:37:24","slug":"screen-%ec%82%ac%ec%9a%a9-%eb%b0%a9%eb%b2%95-%ec%a0%95%eb%a6%ac","status":"publish","type":"post","link":"https:\/\/ahnbk.com\/?p=1416","title":{"rendered":"screen \uc0ac\uc6a9 \ubc29\ubc95 \uc815\ub9ac"},"content":{"rendered":"\n<p>\uc6d0\uaca9\uc758 \ub85c\ubd07\uc5d0 ssh\ub85c \uc811\uc18d\ud558\uc5ec \uc791\uc5c5\uc744 \uc218\ud589\ud560 \uacbd\uc6b0, <\/p>\n\n\n\n<ul><li>\uc5ec\ub7ec \uac1c\uc758 \ud130\ubbf8\ub110\uc774 \ud544\uc694\ud558\ub2e4\uba74?<\/li><li>\uc5b4\ub5a4 \uc791\uc5c5\uc744 \uc218\ud589\ud574 \ub193\uace0, ssh \uc811\uc18d\uc744 \ub04a\uace0 \uc2f6\ub2e4\uba74? (\ubb3c\ub860 \uc791\uc5c5\uc740 \uacc4\uc18d \uc218\ud589\ud558\ub3c4\ub85d)<\/li><\/ul>\n\n\n\n<p>\uc5ec\ub7ec\uac1c\uc758 \ud130\ubbf8\ub110\uc740 tmux\ub85c\ub3c4 \ud574\uacb0\uc774 \uac00\ub2a5\ud558\uc9c0\ub9cc, \uc791\uc5c5\uc744 \uc218\ud589\ud574 \ub193\uace0 ssh \uc811\uc18d\ub9cc \ub04a\uace0 \uc2f6\ub2e4\uba74 screen\uc774 \ud574\uacb0 \ubc29\ubc95\uc774 \ub420 \uc218 \uc788\uc74c.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\uc124\uce58<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ sudo apt install screen<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\ubcc4\ub2e4\ub978 \uc124\uc815\uc740 \ud544\uc694\ud558\uc9c0 \uc54a\uace0, \ub2e8\uc21c\ud788 \uba85\ub839\ub9cc \uc785\ub825\ud558\uba74 \uc2e4\ud589. \uc635\uc158\uc774 \ub2e4\uc74c\uacfc \uac19\uc774 \uc788\uc9c0\ub9cc, \uba87 \uac1c\ub9cc \uc54c\uba74 \uc0ac\uc6a9\ud558\ub294\ub370\ub294 \ubb38\uc81c \uc5c6\uc74c.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ screen -h\n Use: screen [-opts] [cmd [args]]\n  or: screen -r [host.tty]\n Options:\n -4            Resolve hostnames only to IPv4 addresses.\n -6            Resolve hostnames only to IPv6 addresses.\n -a            Force all capabilities into each window's termcap.\n -A -[r|R]     Adapt all windows to the new display width &amp; height.\n -c file       Read configuration file instead of '.screenrc'.\n -d (-r)       Detach the elsewhere running screen (and reattach here).\n -dmS name     Start as daemon: Screen session in detached mode.\n -D (-r)       Detach and logout remote (and reattach here).\n -D -RR        Do whatever is needed to get a screen session.\n -e xy         Change command characters.\n -f            Flow control on, -fn = off, -fa = auto.\n -h lines      Set the size of the scrollback history buffer.\n -i            Interrupt output sooner when flow control is on.\n -l            Login mode on (update \/var\/run\/utmp), -ln = off.\n -ls [match]   or\n -list         Do nothing, just list our SockDir [on possible matches].\n -L            Turn on output logging.\n -Logfile file Set logfile name.\n -m            ignore $STY variable, do create a new screen session.\n -O            Choose optimal output rather than exact vt100 emulation.\n -p window     Preselect the named window if it exists.\n -q            Quiet startup. Exits with non-zero return code if unsuccessful.\n -Q            Commands will send the response to the stdout of the querying process.\n -r [session]  Reattach to a detached screen process.\n -R            Reattach if possible, otherwise start a new session.\n -s shell      Shell to execute rather than $SHELL.\n -S sockname   Name this session .sockname instead of ...\n -t title      Set title. (window's name).\n -T term       Use term as $TERM for windows, rather than \"screen\".\n -U            Tell screen to use UTF-8 encoding.\n -v            Print \"Screen version 4.08.00 (GNU) 05-Feb-20\".\n -wipe [match] Do nothing, just clean up SockDir [on possible matches].\n -x            Attach to a not detached screen. (Multi display mode).\n -X            Execute  as a screen command in the specified session.<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\uc2e4\ud589\uc2dc screen \uc138\uc158 \uc774\ub984 \uc124\uc815\ud558\uae30. \uae30\ubcf8\uc73c\ub85c \ubd80\uc5ec\ub418\ub294 \uc774\ub984\uc774 \uc788\uc9c0\ub9cc \uc678\uc6b0\uae30 \uc5b4\ub824\uc6b0\ubbc0\ub85c, \uc0ac\uc6a9\uc790\uac00 \uc9c1\uc811 \uc9c0\uc815 \uac00\ub2a5.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ screen -S &lt;session-name&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\uc2e4\ud589\ub418\uc5b4 \uc788\ub294 \uc0c1\ud0dc\uc5d0\uc11c \uc138\uc158\uacfc\uc758 \uc5f0\uacb0 \ub04a\uae30<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">Ctrl + A, d<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\uc2e4\ud589\ub418\uc5b4 \uc788\ub294 \uc138\uc158\uc5d0 \ub2e4\uc2dc \uc5f0\uacb0\ud558\uae30<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ screen -r &lt;session-name&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\uc2e4\ud589\ub418\uc5b4 \uc788\ub294 \uc138\uc158 \ub9ac\uc2a4\ud2b8 \ubcf4\uae30<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ screen -ls<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>\ud301.<\/p>\n\n\n\n<p>screen\ub97c \uc2e4\ud589\ud574\uc11c \ub4e4\uc5b4\uac00\uba74, \ud130\ubbf8\ub110 \uc124\uc815\uc774 \ubcc0\uacbd\ub418\uc5b4 PS1\uc774 \ub9ac\uc14b\ub418\ub294 \ud604\uc0c1\uc774 \uc788\ub294\ub370, \uc774\ub97c \ubc29\uc9c0\ud558\ub824\uba74 ~\/.screenrc \ud30c\uc77c\uc5d0 \ub2e4\uc74c\uacfc \uac19\uc774 \uc785\ub825<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ vi ~\/.screenrc\n\nterm screen-256color<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>screen\ub97c \uc2e4\ud589\ud558\uba74, \uc774\uc804 \ud654\uba74\uc744 \ubcf4\ub294\uac8c \uc9c0\uc6d0\uc548\ub428. screen \ub0b4\ubd80 \uba85\ub839\uc73c\ub85c \ud574\uacb0\ud574\uc57c \ub418\ub294\ub370, <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">Ctrl + A, Esc<\/code><\/pre>\n\n\n\n<p>\uc774 \uc0c1\ud0dc\uc5d0\uc11c, PgUp\/PgDown, Up\/Down\uc73c\ub85c \uc2a4\ud06c\ub864 \uac00\ub2a5.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\ub05d!.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc6d0\uaca9\uc758 \ub85c\ubd07\uc5d0 ssh\ub85c \uc811\uc18d\ud558\uc5ec \uc791\uc5c5\uc744 \uc218\ud589\ud560 \uacbd\uc6b0, \uc5ec\ub7ec \uac1c\uc758 \ud130\ubbf8\ub110\uc774 \ud544\uc694\ud558\ub2e4\uba74? \uc5b4\ub5a4 \uc791\uc5c5\uc744 \uc218\ud589\ud574 \ub193\uace0, ssh \uc811\uc18d\uc744 \ub04a\uace0 \uc2f6\ub2e4\uba74? (\ubb3c\ub860 \uc791\uc5c5\uc740 \uacc4\uc18d \uc218\ud589\ud558\ub3c4\ub85d) \uc5ec\ub7ec\uac1c\uc758 \ud130\ubbf8\ub110\uc740 tmux\ub85c\ub3c4 \ud574\uacb0\uc774 \uac00\ub2a5\ud558\uc9c0\ub9cc, \uc791\uc5c5\uc744 \uc218\ud589\ud574 \ub193\uace0 ssh \uc811\uc18d\ub9cc \ub04a\uace0 \uc2f6\ub2e4\uba74 screen\uc774 \ud574\uacb0 \ubc29\ubc95\uc774 \ub420 \uc218 \uc788\uc74c. \uc124\uce58 \ubcc4\ub2e4\ub978 \uc124\uc815\uc740 \ud544\uc694\ud558\uc9c0 \uc54a\uace0, \ub2e8\uc21c\ud788 \uba85\ub839\ub9cc \uc785\ub825\ud558\uba74 \uc2e4\ud589. \uc635\uc158\uc774 \ub2e4\uc74c\uacfc \uac19\uc774 \uc788\uc9c0\ub9cc, \uba87 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ahnbk.com\/?p=1416\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;screen \uc0ac\uc6a9 \ubc29\ubc95 \uc815\ub9ac&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[59],"tags":[318],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2wXSW-mQ","jetpack-related-posts":[],"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts\/1416"}],"collection":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1416"}],"version-history":[{"count":3,"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts\/1416\/revisions"}],"predecessor-version":[{"id":1424,"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts\/1416\/revisions\/1424"}],"wp:attachment":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}