LFCS · Question #807
Which shell command is used to continue background execution of a suspended command?
The correct answer is B. bg. The bg command is used in shell job control to resume a suspended process in the background.
Question
Options
- A&
- Bbg
- Ccont
- Dexec
- E:&
How the community answered
(62 responses)- B94% (58)
- C2% (1)
- D2% (1)
- E3% (2)
Why each option
The `bg` command is used in shell job control to resume a suspended process in the background.
The `&` symbol is used to start a command in the background initially, not to resume a suspended one.
When a command is suspended (typically by pressing Ctrl+Z), the `bg` (background) command can be used to resume its execution in the background, allowing the user to regain control of the shell while the job continues running.
`cont` is not a standard shell command for continuing background execution of suspended jobs.
`exec` replaces the current shell with the specified command, it does not resume suspended jobs.
`:` is a no-operation command and `:&` is not a standard shell command for job control.
Concept tested: Shell job control (backgrounding processes)
Source: https://www.gnu.org/software/bash/manual/bash.html#Job-Control-Builtins
Topics
Community Discussion
No community discussion yet for this question.