LX0-103 · Question #196
Which of the following commands moves and resumes in the background the last stopped shell job?
The correct answer is B. bg. The bg command resumes the most recently stopped shell job by running it in the background, allowing the shell prompt to return immediately.
Question
Which of the following commands moves and resumes in the background the last stopped shell job?
Options
- Arun
- Bbg
- Cfg
- Dback
How the community answered
(51 responses)- A4% (2)
- B86% (44)
- C2% (1)
- D8% (4)
Why each option
The bg command resumes the most recently stopped shell job by running it in the background, allowing the shell prompt to return immediately.
run is not a valid shell built-in or standard Unix command for job control.
The bg built-in command takes the most recently stopped job (or a specified job number) and resumes its execution in the background, equivalent to having originally started it with '&'. It sends the job a SIGCONT signal and the shell continues accepting input while the job runs asynchronously.
fg brings a background or stopped job to the foreground - the opposite of what is asked - making it the current active job in the terminal.
back is not a valid shell built-in or standard Unix command for job control.
Concept tested: Shell job control bg command background resumption
Source: https://www.gnu.org/software/bash/manual/html_node/Job-Control-Builtins.html
Topics
Community Discussion
No community discussion yet for this question.