Working with Screen

Howto Sep 16, 2019

Screen is a program in línux, users can use to multiplex a physical console within a multiple interactive shells. It is very easy to use and can be started by simple typing

screen

To view if a screen is attached or detached.

screen -ls
There is a screen on:
        31691.pts-0.test    (Attached)
1 Socket in /var/run/screen/S-test.

we can simply detach from a screen session by using

ctrl A + D

to check if the session is detached, it can be proofed with the following command

[detached from 31691.pts-0.test]
[root@test ~]# screen -ls
There is a screen on:
        31691.pts-0.test    (Detached)
1 Socket in /var/run/screen/S-test.

We can re-attach ourselves to the screen session again by using

screen -r
screen -ls
There is a screen on:
        31691.pts-0.test    (Attached)
1 Socket in /var/run/screen/S-test.

To exit the screen session simply type

exit
[screen is terminating]
No Sockets found in /var/run/screen/S-test.
Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
#