screen 工具用法

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登录上目标机器时可以:

1. 选择已有screen session中的一个 用screen -r恢复上去
2. 创建新的session

当已经连接在某个session上时,动作产生的结果:
1. 创建新的screen时,session列表中不会新增session entry或者ID,只会新增window叠加在现在所处的session上,共用一个entry和ID
2. kill当前window 可以通过.screenrc中绑定的快捷键来杀死他

例子链接:

参考自: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 (有很多人自己的配置)


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值