linux screen 总结

screen Create a new screen.
screen -S <screen name> Create a new screen with name.
screen -ls List all screens.
screen -d <sessionid> Detach a screen.
screen -r <sessionid> Reconnect the detached screen.
screen -h 10000 Set the size of the scrollback history buffer as 10000 lines
screen -L Begin to record log for the screen window
Operations within the Windows:
Ctrl-a " List all windows to select
Ctrl-a Space Switch between windows
Ctrl-a w List all windows
Ctrl-a K kill current window
Ctrl-a d Detach the screen
Ctrl-a S Create new windows in horizontal
Ctrl-a Tab Switch between windows
Ctrl-a X Close current window
Ctrl-a + Increase current window, increase 3 lines by default
Ctrl-a - Decrease current window, decrease 3 lines by default
Ctrl-a H Record screen history to a file. Repeat to stop record.
Ctrl-a :resize <height> Change height of current window
Ctrl-a :quit Exit screen, close all screen clients, close all works

  • Ctrl-a :sessionname <newname>
    •   更改 screen session 的名字


Ctrl-a <Esc> Enter into window select mode
<PageUp> or Ctrl-u Page up
<PageDown> or Ctrl-d Page down
<Left> or h Left 1
<Down> or j Down 1
<Up> or k Up 1
<Right> or l Right 1
<Space> Begin to select, stop to select
<Esc> Exit from window select mode
Ctrl-a ] Paste selected value
# ~/.screenrc Config file

原文地址:https://www.cnblogs.com/weiweifeng/p/13262889.html