以try.R为例,在此代码首行增加 #! /usr/bin/env Rscript 然后在命令行 Rscript try.R &>nohup.out& ref:https://www.cnblogs.com/hunttown/p/5802082.html