Kill Attached Screen in Linux

Slowcoder picture Slowcoder · Feb 11, 2013 · Viewed 131.3k times · Source

I created a screen "myscreen" in linux and it stopped responding abruptly. I closed the terminal and tried to reopen it. "screen -ls" shows that the screen is Attached. I tried the following commands but nothing responds.

screen -r myscreen
screen -D myscreen
screen -D -RR myscreen
screen -X -S myscreen quit

Any help to reattach to the screen or to kill the screen is very much appreciated.

Answer

Desta Haileselassie Hagos picture Desta Haileselassie Hagos · Nov 25, 2013
screen -X -S SCREENID kill

alternatively, you can use the following command

screen -S SCREENNAME -p 0 -X quit

You can view the list of the screen sessions by executing screen -ls