Use <command> &
to run in the background of terminal, but not detached, meaning the process will be killed after the terminal window is closed.
Use nohup <command> &
to detach from the terminal, and suppress all the outputs.
[1] [2]
nohup
must be used before a <command>
.
If already launched, use disown
to achieve the same effect, detaching the process, runing in background, and allowing close the terminal. [2]