Kill detached screen session
如果想杀死一个已经detached的screen会话,可以使用以下命令:
screen -X -S [session # you want to kill] quit
举例:
[root@localhost]# screen -ls
There are screens on:
2883.amh (Detached)
12342.lnmp (Detached)
2 Sockets in /var/run/screen/S-root.
[root@localhost]# screen -X -S 2883 quit
[root@localhost]# screen -ls
There is a screen on:
12342.pts-0.localhost (Detached)
1 Socket in /var/run/screen/S-root.
2883会话已经没有了。