nerdexam
CompTIA

XK0-004 · Question #401

Which of the following command should an administrator use to prevent users from starting the httpd service on a system-based Linux system?

The correct answer is A. Systemct1 mask httpd. On a systemd-based Linux system, 'systemctl mask httpd' is the correct command to completely prevent users from starting the httpd service. Masking creates a symlink from the service unit file to /dev/null, making it impossible to start the service by any means - manually or auto

System Management

Question

Which of the following command should an administrator use to prevent users from starting the httpd service on a system-based Linux system?

Options

  • ASystemct1 mask httpd
  • BSystemct1 disables httpd
  • CChkconfig httpd off
  • DSystemctl stop httpd

How the community answered

(21 responses)
  • A
    86% (18)
  • C
    10% (2)
  • D
    5% (1)

Explanation

On a systemd-based Linux system, 'systemctl mask httpd' is the correct command to completely prevent users from starting the httpd service. Masking creates a symlink from the service unit file to /dev/null, making it impossible to start the service by any means - manually or automatically - even by root. This is stronger than disabling.

Topics

#systemctl mask#service prevention#systemd#httpd

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice