CompTIA Linux+ (XK0-004) — Question 6

A Linux administrator is testing connectivity to a remote host on a shared terminal. The administrator wants to allow other users to access the terminal while the command is executing.
Which of the following commands should the administrator use?

Answer options

Correct answer: D

Explanation

The correct command is 'ping remotehost &' because the '&' symbol runs the command in the background, allowing other users to access the terminal simultaneously. The 'bg' command would resume a paused job in the background but is not appropriate for starting a new command, while 'fg' brings a background job to the foreground, which would block other users. The command 'ping remotehost < results' is incorrect as it does not run the ping command in a way that allows concurrent terminal access.