screen kill 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

Example 5: kill all screen sessions linux

pkill screen

Example 6: kill screen sessions

screen -ls
screen -XS [screen sessionid] quit
#eg: screen -XS 20411 quit

Tags:

Misc Example