Ctrl+Z stopped job 1, and jobs shows it as Stopped.
Resume that job in the background.
Which command is appropriate?
bg %1 resumes job 1 in the background. Ctrl+Z normally stops the foreground job with SIGTSTP.
Detailed explanation
fg %1Incorrect. fg would resume job 1 in the foreground.
bg %1Correct. bg %1 resumes the stopped job in the background.
jobs %1Incorrect. jobs lists jobs rather than resuming one.
wait %1Incorrect. wait waits for a job rather than continuing it in the background.
Try it yourself
An example you can run in a temporary verification environment.
help bgExpected result
Bash builtin bgのhelpKey points
- Ctrl+Z
- Stopped
- bg
Notes
- Environment: Bash 5.x builtin help
- Use a disposable process or test shell when checking lifecycle commands.
- Exact output and option names can vary slightly by distribution and tool version.
Foundation review
Place the operation
bg resumes a stopped job away from the foreground; fg resumes it while returning terminal control.
Check the side effect
A program that needs terminal input can stop again when it is resumed in the background.