定位到需要运行的文件目录下,假设需要运行的文件为run.py,执行类似如下代码:
nohup python3 run.py &
nohup:端开ssh是依旧保持服务
&:把服务挂在后台运行
查看后台运行的服务的实时输出,依旧需要定位到刚才的目录下,然后执行:
tail -f nohup.out
定位到需要运行的文件目录下,假设需要运行的文件为run.py,执行类似如下代码:
nohup python3 run.py &
nohup:端开ssh是依旧保持服务
&:把服务挂在后台运行
查看后台运行的服务的实时输出,依旧需要定位到刚才的目录下,然后执行:
tail -f nohup.out