如果向杀死一个已经detached的screen会话,可以使用以下命令:
screen -X -S seesion-id quit
举例如下:
[root@localhost ~]# screen -ls There are screens on: 9975.pts-0.localhost (Detached) 4588.pts-3.localhost (Detached) 2 Sockets in /var/run/screen/S-root. [root@localhost ~]# screen -X -S 4588 quit [root@localhost ~]# screen -ls There is a screen on: 9975.pts-0.localhost (Detached) 1 Socket in /var/run/screen/S-root.
可以看到,4588会话已经没有了
附:linux screen 命令详解 :http://www.cnblogs.com/mchina/archive/2013/01/30/2880680.html