我是Ubuntu的新手。我用过Sublime Text。我已经意识到,从终端打开Sublime Text之后,如果关闭终端,应用程序将继续运行。对于其他应用程序(例如),情况并非如此geany
。
从终端打开应用程序后,当我关闭终端时,应用程序也会关闭。我已经试过&exit
喜欢geany &exit
。但这不是我想要的。
geany
关闭后如何继续运行?
编辑:这可能仅适用于某些类型的终端。最disown
好像下面一样启动命令后再运行一个命令,以使应用程序与终端窗口解除关联。
在终端窗口中,输入
nohup geany > /dev/null
disown
或者
nohup geany >/dev/null &
disown
nohup
允许应用程序运行并不受挂断的影响,因此关闭终端窗口不会对正在运行的应用程序产生任何影响。>/dev/null
在命令中添加会阻止在nohup.out
运行应用程序的每个目录中创建。
从手册页:
NAME
nohup - run a command immune to hangups, with output to a non-tty
SYNOPSIS
nohup COMMAND [ARG]...
nohup OPTION
和
$ disown --help
disown: disown [-h] [-ar] [jobspec ... | pid ...]
Remove jobs from current shell.
Removes each JOBSPEC argument from the table of active jobs. Without
any JOBSPECs, the shell uses its notion of the current job.
Options:
-a remove all jobs if JOBSPEC is not supplied
-h mark each JOBSPEC so that SIGHUP is not sent to the job if the
shell receives a SIGHUP
-r remove only running jobs
Exit Status:
Returns success unless an invalid option or JOBSPEC is given.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句