如何杀死一个已经detached的screen会话?

如果想杀死一个已经detachedscreen会话,可以使用以下命令:

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

《如何杀死一个已经detached的screen会话?》有1个想法

色驴进行回复 取消回复

邮箱地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.