I learned from somewhere a detached screen can be killed by
screen -X -S [session # you want to kill] kill
where [session # you want to kill] can be gotten from
screen -ls .
But this doesn't work. Anything wrong? What's the correct way?
I learned from somewhere a detached screen can be killed by
screen -X -S [session # you want to kill] kill
where [session # you want to kill] can be gotten from
screen -ls .
But this doesn't work. Anything wrong? What's the correct way?
Alternatively, while in your screen session all you have to do is type exit
This will kill the shell session initiated by the screen, which effectively terminates the screen session you are on.
No need to bother with screen session id, etc.
List screens:
Output:
Kill screen session:
You can kill a detached session which is not responding within the screen session by doing the following.
Type
screen -list
to identify the detached screen session.Note:
20751.Melvin_Peter_V42
is your session id.Get attached to the detached screen session
Once connected to the session press Ctrl + A then type
:quit
It's easier to kill a session, when some meaningful name is given:
For me a simple
works. This is from within the screen session.