首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用屏幕有什么好处?

使用屏幕有什么好处?
EN

Server Fault用户
提问于 2010-08-10 15:39:54
回答 6查看 2.3K关注 0票数 4

man screen

代码语言:javascript
复制
   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.

通过技术解释,它与在常规gnome终端中创建选项卡有什么不同?

对于您可以从手册中做的事情列表,我已经可以创建新的选项卡、杀死选项卡、查看我的选项卡列表、在窗口之间切换。只是屏幕更方便吗?有人能用外行人的话解释一下这种好处吗?

EN

回答 6

Server Fault用户

回答已采纳

发布于 2010-08-10 15:48:02

就在你的主页上,C&P会:

代码语言:javascript
复制
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.

简单地说,当您的互联网连接崩溃,您的screend程序继续运行,当您重新登录时,您可以重新附加到该会话。

在其他可能有用的时候,您可以使用nohup,例如运行一个可以中断网络连接几秒钟的脚本(如果您的会话死掉了,您的脚本就会离开SIGHUP,您的计算机就会离开网络)。

我不知道有多少人使用屏幕的“屏幕管理”功能,但我认识很多人,他们分离程序,让他们在注销后继续运行。

票数 9
EN

Server Fault用户

发布于 2010-08-10 15:47:44

对于SSH会话来说,这是天赐之物。与其为远程服务器上的选项卡功能设置5个并发会话(即TCP连接),您还可以拥有1。

现在,想象一下,如果您必须管理5个不同的服务器,每个服务器上有5个选项卡。你会有25个单独的标签。有了这个选项卡,您就可以拥有5个选项卡,然后知道您在哪个服务器上。

另一个巨大的好处是,您可以从TTY注销(在本例中,关闭选项卡),然后稍后重新连接,然后仍然拥有会话。这对于管理服务器以及在家里都是非常有用的,如果您只是想稍后再弹出一个会话,但是不想在处理其他事情的时候继续查看它几个小时。

票数 5
EN

Server Fault用户

发布于 2010-08-10 15:56:41

如果您知道microsoft远程桌面的工作原理,那么您很容易理解屏幕是如何工作的。除了文本控制台之外,大多数都是相同的。因此,您可以从屏幕控制台分离(断开连接),然后重新连接到离开的会话。使用热键在屏幕上切换窗口,复制,粘贴,冻结,杀死等等.

因此,主要的好处是,如果突然从初始化屏幕的主机断开连接,则可以节省控制台状态,这样您就可以重新连接到主机,并重新附加上次会话。

屏幕-Dr (如果连接了其他任何人并连接到会话) C-a C-空格C-窗口旋转C-c#以创建新的窗口读取人更多,但这是最有用的热键

票数 5
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/168932

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档