bg
Quick Reference
Command Name:
bg
Category:
process management
Platform:
linux
Basic Usage:
Common Use Cases
- 1
Process management
Resume suspended processes in the background
- 2
Job control
Manage multiple processes and their execution states
- 3
Multitasking
Continue working while processes run in background
- 4
System administration
Manage long-running administrative tasks
Syntax
bg [job_spec...]
Options
Option | Description |
---|---|
job_spec | Specifies the job to continue in the background. If no job is specified, the most recently suspended job is used. |
Job Specification Formats:
Format | Description | Example |
---|---|---|
%n | Job number n | bg %1 |
%str | Job whose command begins with str | bg %find |
%?str | Job whose command contains str | bg %?log |
%% | Current job | bg %% |
%+ | Current job (same as %%) | bg %+ |
%- | Previous job | bg %- |
Examples
How to Use These Examples
The examples below show common ways to use the bg
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
Basic Examples:
sleep 100
bg
bg %1
bg
bg %1 %2 %3