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
systemctlcommand 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
chkconfigcommand uses--levelfollowed by the runlevel numbers directly, not--levels 2-5; the syntax--levels 2-5is incorrect. - D. The
systemctlcommand is used for Systemd, and the syntaxsystemctl --levels 2345 onis incorrect for enabling services;systemctl enable myapptypically 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.