Doc /

Using Screen Terminal

Full user manual

$ screen -S name

Create a screen session of the name "name". -S name is optional but handy. Inside, Control A (^a) set command mode, following letter is the command

c if you are already on a screen session, Control ac (^ac) opens a new one

d detach the session (^ad), that is let the session run without displaying it. Then you can logout, the session keeps running.

n (^an) et p (^ap) are next and previous (screen sessions).

screen -ls lists the running sessions

screen -wipe close the inactive sessions ("dead sessions").

H (capital letter, ^aH) start logging of the screen session, to remember what you do. also screen -L logs from the start.

To stop a screen session, you can simply type "exit", but this can as well set you out of the normal terminal (ssh). Better use

k (^ak) kills the current session. Don't do that if your session is doing useful job :-), but you will receive a confirmation message.

screen -r reattach a previous session. screen -r PID reattach the session of that PID (as seen by screen -ls).