朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

通过Screen实现退出终端继续运行命令

前言
有时候会有这样的需求

既不想后台运行,又怕网络或者其他原因导致终端中途断了导致没有完好执行我们想要的效果

那么,我们可以通过screen来满足这个需求

正文

一 安装screen

#Centos
yum update -y
yum install -y screen

#Debian/Ubuntu
apt update -y
apt install -y screen

非root用户安装时可在命令前加sudo

二 screen的用法

1 新建一个screen窗口

# 新建一个名为"new"的窗口
    screen -S new

2 关闭退出/不关闭退出screen窗口

#关闭退出
exit
# 不关闭退出
CTRL+A+D

3 回到screen窗口

回到名为”new”的窗口

screen -rd new

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » 通过Screen实现退出终端继续运行命令

评论 62

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #75

    You really make it seem so easy with your presentation but I find this topic to be really something that I think I would never understand. It seems too complex and very broad for me. I am looking forward for your next post, I?ll try to get the hang of it! ラ ブ ド ー ル

  2. #74

    kuma nasan yadda zan taimake ku buy cialis online usa

    Kigngoore3周前 (03-06)回复