如果想杀死一个已经detached
的screen
会话,可以使用以下命令:
screen -X -S [session # you want to kill] 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
会话已经没有了。
参考资料:
(1)Kill detached screen session。
终于找到了~谢谢!