nerdexam
CompTIACompTIA

XK0-005 · Question #1318

XK0-005 Question #1318: Real Exam Question with Answer & Explanation

The correct answer is A: chkconfig --level 2345 myapp on. The chkconfig --level command is used to configure services to start or stop at specific runlevels in systems using SysVinit.

System Management

Question

A user wants to configure the application "myapp" to start on runlevels 2, 3, 4, and 5 every time the system starts. Which of the following commands will accomplish this task?

Options

  • Achkconfig --level 2345 myapp on
  • Bsystemctl myapp on 2345
  • Cchkcinfig myapp --levels 2-5
  • Dsystemctl --levels 2345 on

Explanation

The chkconfig --level command is used to configure services to start or stop at specific runlevels in systems using SysVinit.

Common mistakes.

  • B. The systemctl command is used for Systemd services, and its syntax for enabling a service across runlevels is different from the one shown, which is incorrect.
  • C. The chkconfig command uses --level followed by the runlevel numbers directly, not --levels 2-5; the syntax --levels 2-5 is incorrect.
  • D. The systemctl command is used for Systemd, and the syntax systemctl --levels 2345 on is incorrect for enabling services; systemctl enable myapp typically enables it for all appropriate runlevels by default.

Concept tested. Linux service management (chkconfig/SysVinit)

Reference. https://linux.die.net/man/8/chkconfig

Topics

#chkconfig#Service Management#Runlevels#Boot Configuration

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions