nohup java -jar app.jar > /dev/null 2>&1 &
时间: 2023-10-26 08:38:53 浏览: 249
jar包服务管理shell脚本
&1 &
This command starts a Java application in the background, redirects standard output to /dev/null (which discards it), redirects standard error to standard output, and detaches the process from the terminal by using nohup and &. This allows the application to continue running even if the terminal is closed, and prevents it from being terminated by the HANGUP (SIGHUP) signal.
阅读全文