Question
how to kill a detached screen session?
Solution 1
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)
Example:
screen -XS 960804.pts-0.aliyun quit
Solution 2
We can also use the exit
command to terminating screen.
That means, first, attach to the session, then, use exit
command.