nerdexam
ExamsLX0-103Questions#38
CompTIA

LX0-103 · Question #38

LX0-103 Question #38: Real Exam Question with Answer & Explanation

The correct answer is A. bg myapp. The 'bg' command resumes a stopped job by running it in the background, freeing the shell prompt for further input.

GNU and Unix Commands

Question

Given the following output: prompt> myapp [1]+ Stopped myapp prompt> Which of the following commands will resume executing the stopped process while allowing the user to continue to type commands at the command prompt?

Options

  • Abg myapp
  • Bcontinue myapp
  • Cexec myapp
  • Dfg myapp
  • Emyapp &

Explanation

The 'bg' command resumes a stopped job by running it in the background, freeing the shell prompt for further input.

Common mistakes.

  • B. 'continue' is a shell loop control keyword used inside for/while loops to skip to the next iteration - it cannot resume a stopped process.
  • C. 'exec' replaces the current shell process with a specified command - it does not resume a stopped background job.
  • D. 'fg' resumes a stopped job in the foreground, which means the terminal is attached to that process and the user cannot type other commands until it finishes.
  • E. Appending '&' starts a brand-new instance of the program rather than resuming the existing stopped process identified by job number [1].

Concept tested. Linux job control - resuming stopped jobs in background

Reference. https://www.gnu.org/software/bash/manual/bash.html#Job-Control-Builtins

Topics

#job control#bg command#background process#process management

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice