How to kill all screen sessions linux

In this article let’s discuss about How to kill all screen sessions linux. Let’s go through the following methods without any delay.

Method 1:

for scr in $(screen -ls | awk '{print $1}'); do screen -S $scr -X kill; done

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

pkill screen

Hope the above solution works.

Realted Posts : How to check active ssh connections on linux