Korean

bg — Resume a stopped job in the background

Linux / Service and process management / bg.html

Service and process managementOriginalRegistered 2026-10-20T09:00:00+09:00

A shell builtin that resumes a stopped job and keeps it running in the background.

Basic Information

Command Namebg
One-line IntroductionA shell builtin that resumes a stopped job and keeps it running in the background.
Provided byBash and POSIX shell builtin
Official Documentationhttps://www.gnu.org/software/bash/manual/html_node/Job-Control-Builtins.html
Supported Operating SystemsLinux, macOS, BSD
Installation StatusInstalled by default (shell builtin)
CategoryLinux service and process management (tags: Process and resource management (tags: job control, background, shell))

What is this command?

bg resumes a job suspended with Ctrl+Z instead of killing it, continuing it in the background.

Without a job number it targets the current job, and it only works on shell-managed jobs.

What problems does it solve?

  • Suspend an editor or build and continue it in the background.
  • Regain the shell prompt while keeping a long job alive.
  • Switch between several jobs.
  • Clean up jobs left in the stopped state.

Key features

Resume the current job

Run without a number to resume the current job.

  • When to use: When continuing the job just stopped
  • What you get: Continues in the background
  • Limitations: Output may interleave with the prompt

Resume by number

Specify a job number obtained from jobs.

  • When to use: When resuming one of several jobs
  • What you get: That job moves to the background
  • Limitations: Jobs from other sessions cannot be targeted

Checking state

After resuming, use jobs to confirm it is running.

  • When to use: When confirming the resume worked
  • What you get: Shows the Running state
  • Limitations: Completion still needs a separate check

Installation and usage

Check whether it is installed

help bg

man bash # bg is a shell builtin

Real-world examples

Resume current

Send the stopped job to the background.

# Resume the current stopped job in the background
bg

Resume by number

Resume job number 1.

# Resume job 1 in the background
bg %1

Verify

Check the job list afterwards.

# Confirm the job is running
jobs -l