screen terminate session code example
Example 1: linux screen kill attached session
screen -X -S SCREENID kill
Example 2: screen kill all
killall screen
Example 3: kill screen
$ screen -X -S [session # you want to kill] quit
Example 4: screen kill session
$ screen -X -S [session # you want to kill] quit
Example 5: screen quit session
# First, find the session you want to quit
screen -ls
# Quit the session
screen -XS [session identifier you want to quit] quit
Example 6: kill screen sessions
screen -ls
screen -XS [screen sessionid] quit
#eg: screen -XS 20411 quit