Linuxlab

Background jobs: &, jobs, fg, bg

Updated July 3, 2026

A trailing & runs a command in the background: the shell is free at once. You manage your jobs with jobs, fg, bg.

sleep 100 &      # into the background
jobs             # the job list
fg %1            # bring job 1 to the foreground
Ctrl+Z           # suspend, then bg %1 to resume in the background

Jobs belong to the current shell. If the shell closes, its background jobs usually go with it.

Used in

You need this in the lesson Processes and jobs.