Linux and Unix bg command
Quick links
About bg
Syntax
Examples
Technical support
Related commands
Linux and Unix main page
Continues a stopped job in the background. This function is not available on all Unix shell's.
bg [-l] [-p] [-x] [job]
| -l | Report the process group ID and working directory of the jobs. |
| -p | Report only the process group ID of the jobs. |
| -x | Replace any job_id found in command or arguments with the corresponding process group ID, and then execute command passing it arguments. |
| job | Specifies the job that you want to run in the background. |
bg
Lists the current running jobs.
Below is a listing of how to determine the job when looking at the job listing.
| % or %+ or %% | for the current job. |
| %- or - | for the previous job. |
What causes stopped jobs?
A stopped job will occur if the connection is interrupted or the commanded is interrupted with TSTP signals (typically CTRL + Z).
