Simple scenario from askubuntu :
into your remote box. Typessh screen
the process you want.Then start - Press Ctrl-A then Ctrl-D. This will "detach" your screen
leave your processes running. You can now log out of the remote box.session but - If you want to come back later, log on again and type
screen -r
This will "resume" your screen session, and you can see the output of your process. However, if you have multiple screens have been detached before, you might get this below:
- In this case, just specify the screen you want to re-attach
-r 174044.pts-3screen srvgal107.
- Kill screen session
Press Ctrl-A then K.: - Access
screenattatched screen -D -r '1234.: 'somescreensession - Scroll inside
screen - Maybe there's a better way, but I'm used to scrolling using the "copy mode" (which you can use to copy text using screen itself, although that requires the paste command too):
- Hit your screen prefix combination (
C-a
/ control+A by default), then hit Escape. - Move up/down with the arrow keys (↑ and ↓).
- When you're done, hit Return twice to get back to the end of the scroll buffer.
(If you move the cursor after hitting Return once, you'll be selecting text to copy, and hitting Return the second time will copy it. Then you can paste withC-a
followed by]
) - Quite a session: screen -X -S [session # you want to kill] quit
No comments:
Post a Comment