nerdexam
CompTIA

XK0-006 · Question #52

A Linux user runs the following command: nohup ping comptia.com & Which of the following commands should the user execute to attach the process to the current terminal?

The correct answer is D. fg. The fg command brings a background job to the foreground, attaching it to the current terminal. Since the ping process was started in the background with &, fg is the correct way to reattach it.

System Configuration and Management

Question

A Linux user runs the following command:

nohup ping comptia.com & Which of the following commands should the user execute to attach the process to the current terminal?

Options

  • Arenice
  • Bjobs
  • Cexec
  • Dfg

How the community answered

(36 responses)
  • B
    3% (1)
  • C
    6% (2)
  • D
    92% (33)

Explanation

The fg command brings a background job to the foreground, attaching it to the current terminal. Since the ping process was started in the background with &, fg is the correct way to reattach it.

Topics

#fg#nohup#job control#process management

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice