如何防止脚本在 shell 退出时终止?

Gar*_*all 6 linux bash terminal shell-script

特别是,我创建了一个脚本来启动 Firefox,我双击它并选择“在终端中运行”,但是当 shell 退出时,Firefox 会立即被杀死。

我如何防止这种情况发生?

Han*_* N. 6

您需要将 放在nohup启动命令之前 firefox,因此它需要看起来像这样:

>$ nohup firefox