如何防止在 Linux 中关闭 SSH 客户端后后台进程停止 [英] How to prevent a background process from being stopped after closing SSH client in Linux

查看:28
本文介绍了如何防止在 Linux 中关闭 SSH 客户端后后台进程停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过 SSH (Putty) 在 Linux 机器上工作.我需要让一个进程在夜间运行,所以我想我可以通过在后台启动进程(命令末尾有一个&符号)并将标准输出重定向到一个文件来做到这一点.

I'm working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file.

令我惊讶的是,这行不通.我一关闭 Putty 窗口,进程就会停止.

To my surprise, that doesn't work. As soon as I close the Putty window, the process is stopped.

我怎样才能防止这种情况发生??

How can I prevent that from happening??

推荐答案

查看 "nohup"程序.

这篇关于如何防止在 Linux 中关闭 SSH 客户端后后台进程停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆