Unix/linux generally want to let a program run in the background, many use & at the end of the program to let the program run automatically, but if you want to exit the terminal, the program is still running in the background, you have to use Nohup and & combination to achieve.
Nohup command
Purpose: To run the command without hanging off
Syntax: Nohup Command [Arg ...] [&]
Description: The nohup command runs commands specified by the command parameter and any related arg parameters, ignoring all hang-up (SIGHUP) signals. Use the Nohup command to run a program in the background after logging off: To run the nohup command in the background, you need to add & to the end of the command.
Log records:
The output is appended to the Nohup.out file in the current directory, regardless of whether the output of the Nohup command is redirected to the terminal. If the nohup.out file for the current directory is not writable, the output is redirected to the $home/nohup.out file. If no file can be created or opened for appending, then the command specified by the commands parameter is not callable.
Note When using:
After the shell has been prompted to nohup successful, you also need to press the terminal keyboard any key to return to the Shell Input Command window, and then by entering exit in the Shell to exit the terminal, if the nohup after successful execution of the program button to close the terminal, This time will be broken the corresponding session of the command, resulting in the nohup corresponding process is notified to need to shutdown together, do not have to shut down the terminal after the call program continues to run the role of the background.
Cases:
Nohup/etc/mha/bin/masterha_manager--conf=/etc/mha/app1.cnf--remove_dead_master_conf--ignore_last_failover &
"Go" Linux under the Nohup command to exit the terminal after the program continues to run in the background