nohup java -jar root.jar>xxx.log 2>&1 & nohup:后台启动root.jar2>&1 &:是错误和正确的日志都输出到xxx.log中查询进程ps -ef | grep java杀掉进程kill -9 pid