后台执行py nohup python xxx.py 关闭后台执行py 查看进程pid ps -aux|grep main.py 根据pid关闭关闭进程 kill -9 (pid) 转载于:https://www.cnblogs.com/chenlove/p/10188896.html