bg

Send to background

Syntax
      bg [jobspec ...]


Resume each suspended job jobspec in the background, as if it had been started with &.

bg takes a “jobspec” available from jobs, not a PID.

If jobspec is not present, the shell's notion of the current job is used.

bg jobspec returns 0 unless run when job control is disabled or, when run with job control enabled, any specified jobspec was not found or was started without job control.

This is a BASH shell builtin, to display your local syntax from the bash prompt type: help bg

Examples

Put the job with job id 0 in the background:
$ bg %0

To start a new process in the background you can do:

$ long_running_command &

“Keep your eyes on the stars, and your feet on the ground” - Theodore Roosevelt

Related macOS commands:

fg - Send job to foreground.
wait - Wait for a process to complete.


Copyright © SS64.com 1999-2018
Some rights reserved