Wednesday, September 21, 2011

How to use screen in cli

To start a new screen session, simply type the word "screen" and hit enter. It is preferred that you name your screen session, by instead using "screen -t name".

To "detach" from a screen session, type "Control+A", then "D".

To terminate a screen session, type "exit" and hit enter.

To list currently running screen sessions, type "screen -ls" and hit enter.

To "reattach" a screen session, type "screen -r [name of socket]" and hit enter.
"[name of socket]" is one of the sockets listed from the "screen -ls" command.

To scroll back through console output within a screen session: ctrl-a (release) then type [ Use the up and down arrows. To escape this mode (copy mode) hit esc