linux screen close session code example
Example 1: kill screen
$ screen -X -S [session # you want to kill] quit
Example 2: screen kill session
$ screen -X -S [session # you want to kill] quit
Example 3: 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 4: kill screen session from outside
screen -X -S [session # you want to kill] kill