terminate all screens linux code example
Example 1: kill all screens linux
for scr in $(screen -ls | awk '{print $1}'); do screen -S $scr -X kill; done
Example 2: kill screen session from outside
screen -X -S [session # you want to kill] kill
for scr in $(screen -ls | awk '{print $1}'); do screen -S $scr -X kill; done
screen -X -S [session # you want to kill] kill