Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 python 脚本,它需要 48 多小时才能完成执行,我不想在此期间保持我的笔记本电脑和我的 ssh 连接,我现在的问题是我如何运行 python 脚本,这样即使当我从我的 VPS 注销时,脚本仍将在 VPS 中运行
您可以使用 nohup 命令,即使您关闭会话,它也会运行
nohup command-to-run-script &
所有输出都将写入名为 nohup.out 的文件