Bird
0
0

What does the fg command do in a Linux shell?

easy📝 Conceptual Q11 of 15
Linux CLI - Process Management
What does the fg command do in a Linux shell?
ABrings a background job to the foreground for interaction
BStops a running job immediately
CLists all running jobs
DTerminates a background job
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of fg

    The fg command is used to bring a job running in the background to the foreground so you can interact with it directly.
  2. Step 2: Compare with other commands

    jobs lists jobs, bg resumes jobs in background, and stopping or terminating jobs use other commands.
  3. Final Answer:

    Brings a background job to the foreground for interaction -> Option A
  4. Quick Check:

    fg = bring job to foreground [OK]
Quick Trick: Remember: fg = foreground, bg = background [OK]
Common Mistakes:
  • Confusing fg with bg
  • Thinking fg lists jobs
  • Assuming fg stops jobs

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes