User Tools

Site Tools


techs:programming:learn-bash

Learn Bash

Run in background

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]


[1] a How to Run Bash Commands in the Background in Linux: https://www.maketecheasier.com/run-bash-commands-background-linux/
[2] a, b Differences between “<command> & disown” and “nohup <command> & disown”
techs/programming/learn-bash.txt · Last modified: 2021/06/02 15:15 by foreverph