This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 10 years ago.
The community reviewed whether to reopen this question 9 months ago and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
启动新会话
screen -S your_session_name
重命名现有会话
Ctrl+a, : sessionname YOUR_SESSION_NAME < kbd>输入
To start a new session
screen -S your_session_name
To rename an existing session
Ctrl+a, : sessionname YOUR_SESSION_NAME Enter
要创建名为
foo
的新屏幕,请使用Then 重新附加它,运行
To create a new screen with the name
foo
, useThen to reattach it, run
如前所述,
screen -S SESSIONTITLE
适用于启动带有标题 (SESSIONTITLE
) 的会话,但如果您启动会话并稍后决定更改其标题。这可以通过使用默认键绑定来完成:Ctrl+a、A
其中提示:
Change
SESSIONTITLE
by退格并输入所需的标题。确认名称更改并列出所有标题。Ctrl+a,"
As already stated,
screen -S SESSIONTITLE
works for starting a session with a title (SESSIONTITLE
), but if you start a session and later decide to change its title. This can be accomplished by using the default key bindings:Ctrl+a, A
Which prompts:
Change
SESSIONTITLE
by backspacing and typing in the desired title. To confirm the name change and list all titles.Ctrl+a, "
最简单的方法是使用带有名称的 Screen:
打开返回到 Screen:
例如,使用 Lynx 和 Screen。
创建一个屏幕:
Ctrl+a, d = exit
稍后,您可以使用以下命令返回:
The easiest way is to use Screen with a name:
Return to Screen:
For example, using Lynx with Screen.
Create a screen:
Ctrl+a, d = exit
Later, you can return with:
我是 Screen 的初学者,但我发现它在恢复丢失的连接时非常有用。
您的问题已得到解答,但此信息可能作为附加信息 - 我使用 PuTTY使用 PuTTY 连接管理器并命名我的屏幕 - “tab1”、“tab2”等 - 对我来说,8-10 个选项卡的整体图片比每个单独的选项卡名称更重要。我使用第 8 个选项卡连接到数据库,第 7 个选项卡用于查看日志等。因此,当我想重新连接屏幕时,我编写了一个简单的包装器,其中显示:
其中第一个参数是选项卡编号。
I am a beginner to Screen, but I find it immensely useful while restoring lost connections.
Your question has already been answered, but this information might serve as an add on - I use PuTTY with PuTTY connection manager and name my screens - "tab1", "tab2", etc. - as for me the overall picture of the 8-10 tabs is more important than each individual tab name. I use the 8th tab for connecting to db, the 7th for viewing logs, etc. So when I want to reattach my screens I have written a simple wrapper which says:
where first argument is the tab number.