bg

Move foreground terminal jobs to run in the background

Summary

bg [job_spec ...]

The main purpose

Parameters

job_spec (optional): Specifies the job identifier to be moved to the background for execution, which can be one or more.

return value

Returns successful unless job control is not enabled or an error occurs.

example

#Run the sleep command and press ctrl+z.
sleep 60
^Z
[1]+ Stopped sleep 60

# Use the bg command to run the job in the background.
bg %1

# returned messages:
[1]+sleep 60&

Notice