8

Linux终端命令神器 Screen 使用

 1 year ago
source link: https://chegva.com/5741.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Linux终端命令神器 Screen 使用

2023年7月5日 by anzhihe·0评论 · 308 人阅读 · 隐藏边栏 · 最后更新: 2023/7/7

Screen常用命令:

screen

Hold a session open on a remote server. Manage multiple windows with a single SSH connection.
See also `tmux` and `zellij`.
More information: <https://manned.org/screen>.

- Start a new screen session:
    screen

- Start a new named screen session:
    screen -S session_name

- Start a new daemon and log the output to `screenlog.x`:
    screen -dmLS session_name command

- Show open screen sessions:
    screen -ls

- Reattach to an open screen:
    screen -r session_name

- Detach from inside a screen:
    Ctrl + A, D

- Kill the current screen session:
    Ctrl + A, K

- Kill a detached screen:
    screen -X -S session_name quit
    
--------------------------------------------------------------------------------
    
进入screen会话后,可在会话中创建多个窗口(window),并对窗口进行管理,管理命令以ctrl + a开头。

ctrl + a + c:创建新窗口(create)

ctrl + a + n:切换至下一个窗口(next)

ctrl + a + p:切换至上一个窗口(previous)

ctrl + a + w: 列出所有窗口

ctrl + a + A: 窗口重命名

ctrl + a + d:detach当前会话

ctrl + a + [1-9]: 切换到指定窗口(1-9为窗口号)

ctrl + d:退出(关闭)当前窗口

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK