https://linuxize.com/post/how-to-use-linux-screen/
https://www.mattcutts.com/blog/a-quick-tutorial-on-screen/
-list out the created screens:
screen -ls
create a new screen:
screen -S screen_name
reattach to a existing screen:
screen -r screen_need_to_be_attached
check the current screen:
echo $STY
kill a detached session:
screen -X -S [session name] quit
create a screen to run the program and kill the screen session when the program finished
screen python main.py
General commands:
every screen command starts from ctrl+a
, session and window are two different terms, in one session, it can include several windows.
keys | introductions |
---|---|
ctrl+a d |
detach from current window |
ctrl+a k |
kill current window |
ctrl+a Shift |
split window vertically, this is not supported in GNU version <4.01 |
ctrl+a S |
spllit window horizontally |
ctrl+a TAB |
switch between the splitted windows |
ctrl+a Q |
unsplit window |
`` |
网友评论