screen -S yourname -> 新建一个叫yourname的session
screen -ls -> 列出当前所有的session
screen -r yourname -> 回到yourname这个session
screen -d yourname -> 远程终止断开(detach)某个session
screen -d -r yourname -> 结束当前session并回到yourname这个session
screen -d -r 12865
# 结束当前session并回到yourname这个session
返回编号为12865(用编号或者名字都可以)的screen
如何杀死一个screen
[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.