#Bash 的 bg 命令
bg [JOB_SPEC]...
功能
将作业转为后台运行。
可以使用
fg命令将后台程序恢复到前台。
类型
Bash 内置命令。
参数
JOB_SPEC- 转为后台运行的作业编号;默认为当前作业(最后一个暂停的作业)
#示例
$ nohup java -jar minecraft_server.jar nogui # 然后按 Ctrl + Z 暂停
^Z
[1]+ Stopped nohup java -jar minecraft_server.jar nogui
$ bg # 转为后台运行
[1]+ nohup java -jar minecraft_server.jar nogui &
#相关命令
#推荐阅读
#手册
bg: bg [job_spec ...]
Move jobs to the background.
Place the jobs identified by each JOB_SPEC in the background, as if they
had been started with `&'. If JOB_SPEC is not present, the shell's notion
of the current job is used.
Exit Status:
Returns success unless job control is not enabled or an error occurs.