1.后台启动python脚本 nohup python -u main.py > main.out 2>&1 & 2.打印输出 tail -f main.out 退出Ctrl+C 3.停止python脚本 查看pid: ps -ef | grep python 杀死pid: kill -9 xxxx