command execution with nohup in background
when executing a command with nohup , is that necessary to execute it in background.
If the only thing required is that the command should not hang when closed the terminal, then what is the diffe开发者_运维知识库rnce in ( nohup command & ) and ( nohup command ) ?
Both of the above statements achive this.
Yes, it's necessary that you execute it in the background, if you wish for the shell to be able to exit.
The &
at the end indicates that the command should be running in the background. That means, you can continue to enter commands into the shell.
For your particular question, it does not make any difference as it seems you want to close the terminal window right afterwards anyway.
精彩评论