
man screen
:
Screen is a full-screen window manager that multiplexes a physical ter‐
minal between several processes (typically interactive shells). Each
virtual terminal provides the functions of a DEC VT100 terminal and, in
addition, several control functions from the ISO 6429 (ECMA 48, ANSI
X3.64) and ISO 2022 standards (e.g. insert/delete line and support for
multiple character sets). There is a scrollback history buffer for
each virtual terminal and a copy-and-paste mechanism that allows moving
text regions between windows.
When screen is called, it creates a single window with a shell in it
(or the specified command) and then gets out of your way so that you
can use the program as you normally would. Then, at any time, you can
create new (full-screen) windows with other programs in them (including
more shells), kill existing windows, view a list of windows, turn out‐
put logging on and off, copy-and-paste text between windows, view the
scrollback history, switch between windows in whatever manner you wish,
etc. All windows run their programs completely independent of each
other. Programs continue to run when their window is currently not vis‐
ible and even when the whole screen session is detached from the user's
terminal. When a program terminates, screen (per default) kills the
window that contained it. If this window was in the foreground, the
display switches to the previous window; if none are left, screen
exits.
기술적인 설명을 생략하고 일반 그놈 터미널에서 탭을 만드는 것과 어떻게 다릅니까?
매뉴얼에서 수행할 수 있는 작업 목록의 경우 이미 새 탭 만들기, 탭 삭제, 탭 목록 보기, 창 전환 등이 가능합니다. 화면이 있으면 더 편리할까요? 누군가 평신도의 용어로 이점을 설명할 수 있습니까?
답변1
C&P한 매뉴얼 페이지에서 바로 다음을 수행했습니다.
Programs continue to run when their window is currently not visible and
even when the whole screen session is detached from the user's terminal.
간단히 말해서, 인터넷 연결이 끊어져도 screen
프로그램은 계속 실행되며, 다시 로그인하면 해당 세션에 다시 연결할 수 있습니다.
이것이 유용할 수 있는 다른 경우 중에는 를 사용할 때입니다 nohup
. 예를 들어 몇 초 동안 네트워크 연결을 끊을 수 있는 스크립트를 실행하는 경우입니다(세션이 종료되고 스크립트가 사라지면 SIGHUP
컴퓨터가 네트워크에서 벗어날 수 있습니다).
나는 스크린의 "화면 관리" 기능을 사용하는 사람을 많이 알지 못하지만, 로그아웃 후에도 계속 실행되도록 프로그램을 분리하는 사람들을 많이 알고 있습니다.
답변2
을 위한SSH
세션, 신의 선물이네요. 원격 서버의 탭 기능을 위해 5개의 동시 세션(예: TCP 연결)을 갖는 대신 1개를 가질 수 있습니다.
이제 각각 5개의 탭이 있는 5개의 서로 다른 서버를 관리해야 한다고 상상해 보십시오. 25개의 별도 탭이 있습니다. 이를 통해 탭 5개만 있으면 현재 어느 서버에 있는지 알 수 있습니다.
또 다른 큰 이점은 TTY에서 로그오프(이 경우 탭 닫기)한 다음 나중에 다시 연결하여 세션을 계속 유지할 수 있다는 것입니다. 이는 나중에 세션을 불러오고 싶지만 다른 작업을 하는 동안 몇 시간 동안 계속 보고 싶지 않은 경우 집에서뿐만 아니라 서버를 관리하는 데 매우 유용합니다.
답변3
Microsoft 원격 데스크톱의 작동 방식을 알면 화면 작동 방식을 쉽게 이해할 수 있습니다. 텍스트 콘솔만 제외하면 대부분 동일합니다. 따라서 화면 콘솔에서 분리(연결 끊기)하고 나중에 종료된 세션에 다시 연결할 수 있습니다. 단축키를 사용하여 화면의 창 간 전환, 복사, 붙여넣기, 고정, 종료 등을 수행할 수 있습니다.
따라서 주요 이점은 화면이 초기화되는 호스트에서 갑자기 연결이 끊어진 경우 콘솔 상태를 저장하여 호스트에 다시 연결하고 마지막 세션을 다시 연결할 수 있다는 것입니다.
screen -Dr (다른 사람과 연결되어 있으면 연결을 끊고 세션에 연결) Ca a Ca space Ca backspace 창 회전 Ca c # 새 창을 만들려면 man을 읽어보세요. 그러나 이것은 가장 유용한 단축키입니다.
답변4
screen을 사용하면 다른 PC에서 또는 PC를 다시 시작한 후 screen 세션에 다시 연결할 수 있습니다. 터미널을 열어두지 않고도 서버에서 SSH 세션을 계속 실행할 수 있습니다.