Kill detached screen session
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?
"kill" will only kill one screen window. To "kill" the complete session, use quit
.
Example
$ screen -X -S [session # you want to kill] quit
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.
~$ screen -list There are screens on: 20751.Melvin_Peter_V42 (Detached)
Note: 20751.Melvin_Peter_V42
is your session id.
Get attached to the detached screen session
screen -r 20751.Melvin_Peter_V42
Once connected to the session press Ctrl + A then type :quit
List screens:
screen -list
Output:
There is a screen on:
23536.pts-0.wdzee (10/04/2012 08:40:45 AM) (Detached)
1 Socket in /var/run/screen/S-root.
Kill screen session:
screen -S 23536 -X quit
链接地址: http://www.djcxy.com/p/65678.html
上一篇: 跳过列表与二进制搜索树
下一篇: 杀死分离的屏幕会话