Linux terminal command artifact Screen use

Original link: https://chegva.com/5741.html

Screen common commands:

 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 
  
  
  
-------------------------------------------------- ------------------------------ 
  
  
  
After entering the screen session, you can create multiple windows (window) in the session and manage the windows. The management command starts with ctrl + a. 
  
 
  
ctrl + a + c: create a new window (create) 
  
 
  
ctrl + a + n: switch to the next window (next) 
  
 
  
ctrl + a + p: switch to the previous window (previous) 
  
 
  
ctrl + a + w: list all windows ctrl + a + A: window rename ctrl + a + d: detach the current session ctrl + a + [1-9]: switch to the specified window (1-9 is the window number) 
  
 
  
ctrl + d: exit (close) the current window

refer to:

This article is transferred from: https://chegva.com/5741.html
This site is only for collection, and the copyright belongs to the original author.