Linux上screen命令如何安装,Linux 中screen命令的安装及其使用

安装:

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.( 当创建一个新的会话,给它定义一个名字)

来源:51CTO

作者:提莫叔叔

链接:https://blog.51cto.com/13113400/2487068

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值