root@hcss-ecs-279f:~# screen -ls
There is a screen on:
1489.pts-3.hcss-ecs-279f (04/09/2025 04:45:13 PM)(Attached)1 Socket in /run/screen/S-root.
root@hcss-ecs-279f:~#
命名session
为了便于管理,可以使用-S选项来指定session名称,如下新建了一个名为toby的session
1
2
3
4
5
6
7
8
root@hcss-ecs-279f:~# screen -S toby
root@hcss-ecs-279f:~# screen -ls
There are screens on:
1538.toby (04/09/2025 05:03:09 PM)(Attached) 1489.pts-3.hcss-ecs-279f (04/09/2025 04:45:13 PM)(Attached)2 Sockets in /run/screen/S-root.
root@hcss-ecs-279f:~#
Screen key bindings, page 1 of 2.
Command key: ^A Literal ^A: a
break ^B b history{} other ^A split S
clear C info i pow_break B suspend ^Z z
colon : kill K k pow_detach D time ^T t
copy ^[[ lastmsg ^M m prev ^H ^P p ^? title A
detach ^D d license , quit \ vbell ^G
digraph ^V lockscreen ^X x readbuf < version v
displays * log H redisplay ^L l width W
dumptermcap . login L remove X windows ^W w
fit F meta a removebuf= wrap ^R r
flow ^F f monitor M reset Z writebuf >
focus ^I next ^@ ^N sp n screen ^C c xoff ^S s
hardcopy h number N select' xon ^Q q
help ? only Q silence _
[Press Space for next page; Return to end.]
root@hcss-ecs-279f:~# screen -ls
There is a screen on:
989.ls (04/09/2025 04:16:31 PM)(Attached)1 Socket in /run/screen/S-root.
root@hcss-ecs-279f:~# screen -r 989There is a screen on:
989.ls (04/09/2025 04:16:31 PM)(Attached)There is no screen to be resumed matching 989.
root@hcss-ecs-279f:~#
root@hcss-ecs-279f:~# screen -d 989[989.ls detached.]root@hcss-ecs-279f:~# screen -ls
There is a screen on:
989.ls (04/09/2025 04:16:31 PM)(Detached)1 Socket in /run/screen/S-root.
root@hcss-ecs-279f:~# screen -r 989