安装:

1、下载安装包地址:http://www.rpmfind.net/linux/rpm2html/search.php?query=screen

2、将其解压缩到任何一个bin目录下:tar -zxvf /usr/bin

3、使用包安装指令进行安装:yum install screen

fd6e92fafdc1b2da6f8c6e5d2308006d.png

使用:

screen为多重视窗管理程序。screen能在一个终端程序执行多个任务,离线执行任务等。

语法: screen [ -options ] [ cmd [ args ] ]

screen -r [[pid.]tty[.host]]

命令行参数: -A

Adapt the sizes of all windows to the size of the current terminal.(将所有的窗口调整为终端的大小)

-d|-D [pid.tty.host]

does not start screen, but detaches the elsewhere running screen session.(不启动屏幕,但是分离在别处运行的会话)

-h num

Specifies the history scrollback buffer to be num lines high.(指明历史缓冲区行数)

-m causes screen to ignore the $STY environment variable. With "screen -m" creation of a new session is enforced,(忽略$STY(screen会话)环境变量,强制创建一个新的会话)

-r sessionowner/[pid.tty.host]

resumes a detached screen session.(恢复离线的会话)

-R attempts to resume the first detached screen session it finds. If successful, all other command-line options are ignored. If no detached session exists, starts a new session using the specified options, just as if -R had not been specified.(先恢复离线,若没有离线则创建新的会话)

-ls [match]

-list [match]

does not start screen, but prints a list of pid.tty.host strings identifying your screen(显示目前所有的screen作业)

sessions.

-wipe [match]

does the same as "screen -ls", but removes destroyed sessions instead of marking them as -S sessionname

When creating a new session, this option can be used to specify a meaningful name for the session.)

-x Attach to a not detached screen session. (Multi display mode). (恢复之前离线的screen作业)

-S sessionname

When creating a new session, this option can be used to specify a meaningful name for the session.( 当创建一个新的会话,给它定义一个名字)

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐