nerdexam
CompTIA

XK0-005 · Question #652

A Linux administrator wants to prevent the httpd web service from being started both manually and automatically on a server. Which of the following should the administrator use to accomplish this…

The correct answer is A. systemctl mask httpd. The best command to use to prevent the httpd web service from being started both manually and automatically on a server is systemctl mask httpd. This command will create a symbolic link from the httpd service unit file to /dev/null, which will make the service impossible to…

System Management

Question

A Linux administrator wants to prevent the httpd web service from being started both manually and automatically on a server. Which of the following should the administrator use to accomplish this task?

Options

  • Asystemctl mask httpd
  • Bsystemctl disable httpd
  • Csystemctl stop httpd
  • Dsystemctl reload httpd

How the community answered

(41 responses)
  • A
    73% (30)
  • B
    5% (2)
  • C
    7% (3)
  • D
    15% (6)

Explanation

The best command to use to prevent the httpd web service from being started both manually and automatically on a server is systemctl mask httpd. This command will create a symbolic link from the httpd service unit file to /dev/null, which will make the service impossible to start or enable. This is different from systemctl disable httpd, which will only prevent the service from starting automatically on boot, but not manually.

Topics

#systemctl#service management#masking services#Linux administration

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice