Sha*_*ang 3 python ssh bash sh
我正在filename.py通过ssh 运行Python脚本.一旦我登录远程机器,我运行:
python filename.py &
Run Code Online (Sandbox Code Playgroud)
但是,当我关闭终端时,似乎python停止运行.为什么是这样?我认为&声明结束时的&符号意味着程序继续运行?
用途nohup:
nohup python filename.py &
Run Code Online (Sandbox Code Playgroud)
nohup [command] & 将在后台运行该作业并返回到shell.