Name
bg
Synopsis
bg [%jobnumber
]
The built-in command bg
sends a suspended job to run in the background. With no arguments,
bg
operates on the most
recently suspended job. To specify a particular job (shown by the
jobs
command), supply the job
number preceded by a percent sign:
$ bg %2
Some types of interactive jobs cannot remain in the background—for instance, if they are waiting for input. If you try, the shell will suspend the job and display:
[2]+ Stopped command line here
You can now resume the job (with fg
) and continue.
Get Linux Pocket Guide, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.