To "kill" the complete session, use quit
.
screen -X -S [session # you want to kill] quit
eg:
sc-xterm-26:~> screen -ls
There are screens on:
7031.pts-111.sc-xterm-26 (Detached)
19989.pts-423.sc-xterm-26 (Detached)
18979.pts-250.sc-xterm-26 (Detached)
27811.pts-286.sc-xterm-26 (Attached)
4 Sockets in /var/run/screen/S-jefli.
sc-xterm-26:~> screen -X -S 19989.pts-423.sc-xterm-26 quit
sc-xterm-26:~> screen -ls
There are screens on:
7031.pts-111.sc-xterm-26 (Detached)
18979.pts-250.sc-xterm-26 (Detached)
27811.pts-286.sc-xterm-26 (Attached)
3 Sockets in /var/run/screen/S-jefli.
重要快捷键
ctrl+a+A: 重命名当前window,注意是大写A
ctrl+a+K: kill当前window,注意是大写K
在putty登录上目标机器时可以:
例子链接:
参考自:http://ubuntuforums.org/archive/index.php/t-1080362.html http://www.softpanorama.org/Utilities/Screen/screenrc_examples.shtml (有很多的例子可以参考) https://bbs.archlinux.org/viewtopic.php?id=55618&p=1 (有很多人自己的配置)