本文首发地址:https://liguang.wang/index.php/archives/87/ 命令 nohup Rscript 1.R > out1.txt 2> err1.txt & 其中nohup确保不会再关闭终端后被kill掉 &确保转入后台运行 查看运行情况 如果关闭终端后再次进入,想查看程序运行情况,可使用ps -ef | grep 用户名或者ps -A ux | grep 用户名