terminate all screen sessions 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 all screen sessions linux
pkill screen
Example 3: kill screen sessions
screen -ls
screen -XS [screen sessionid] quit
#eg: screen -XS 20411 quit