Raspberry Pi  Screen Tutoria

“Screen” is a program to run one or multiply SSH connections in the background.  The session will keep alive, even if you close your SSH connection.

Install screen:

sudo apt-get install screen
[Enter]

Now you have Screen installed.

Typ:

Screen
[Enter]

Now you see a screen like this:

screenprogram1

 

Press the spacebar / Enter key / Return key to move on.

This screen looks like the same as a normal putty connection. But you are in the “screen” program.

Screen command list:

Ctrl + A + C:  Create a new SCREEN session.
Ctrl + A + N:  Switch to the Next screen session.
Ctrl + A + P:  Switch to the Previous screen session.
Ctrl + A + D:  Detaches a screen session (without killing the processes in it – they continue).

 

To close a Screen session typ:

exit
[ENTER]

 

If you are in the normal SSH session, and you want to start a virtual screen session with the name “thevirualsession”

screen -S thevirualsession.

Back to the normal ssh session and keep the virtual session alive (Detache):

Control + a + d

If you are in the normal SSH connection, and you want to see all the current screens:

screen -ls
[ENTER]

i have 1 “Screen” session open:

screenprogram2

 

And now how to switch to the “Screen” session? Typ:

screen -r 2494.pts-0.raspberrypi
[enter]

Have fun!