在命令后接上 &
下面以运行python代码的为例,介绍如何使用: nohup python main.py train > run20200930_2.log 2>&1 &。 针对上面这条代码,稍加修改就ok了~