screen list | How to list running screen sessions?

List running sessions/screens:

To list all of the screen sessions for a user, run the following command as that user:

screen -ls

Example:

$ screen -ls

There is a screen on:

        10405.example   (Attached)

1 Socket in /var/run/screen/S-centos.

All screen sessions on the machine:

To see all screen sessions on a specific machine you can do:

$ ls -laR /var/run/screen/

/var/run/screen/:

total 0

drwxrwxr-x.  3 root   screen  60 Dec  6 12:39 .

drwxr-xr-x. 24 root   root   780 Dec  6 16:06 ..

drwx------.  2 centos centos  60 Dec  6 12:49 S-centos

/var/run/screen/S-centos:

total 0

drwx------. 2 centos centos 60 Dec  6 12:49 .

drwxrwxr-x. 3 root   screen 60 Dec  6 12:39 ..

srwx------. 1 centos centos  0 Dec  6 16:23 10405.example_screen