kill a screen session

first you need to re attach to the screen session
screen -r 23520 as you have done. Then press ctrl + a and then a k and press y when it asks if you really want to kill the session

Source


You can quit that screen without attaching to it. First, find its session:

$ screen -ls

and then quit it:

$ screen -XS [session # you want to quit] quit

(-X = Execute command, -S session PID to execute on)

[UPDATE]

Example:

screen -XS 20411 quit

So with all those official suggestions, lets just go for something easier, and just as effective, and kind of more straight forward.

pkill screen

Who wants to go into an unknown and un-needed screen just to press in a couple commands that most might barely remember? This avoids going into it at all, and kills it straight off.

Plus, if you have more than one, this will take them all in one fell swoop.

Tags:

Gnu Screen