Linux服务器后台运行Python nohup python -u test.py > test.log 2>&1 & 最后的&表示后台运行 >表示日志输出重定向 Linux默认定义两个变量:1和2 2 错误输出 1 标准输出 cmd 1>info.log 2>error.log &