Unix Shell Background
Launch a Process to Background
adds an &
after the command
The program will still write to stdout
We can use
command > /dev/null 2>&1 &
to suppress that (redirect stdout to/dev/null
and stderr to stdout)
To Foreground the Process
We can use fg
. To see a list of jobs, we can use jobs
To Background a Currently Running Process
Press Ctrl + Z
to put the current process on sleep and return to shell, then use bg
to resume the job in background.