nerdexam
CompTIA

XK0-004 · Question #527

A senior systems administrator wants to standardize the commands used in the department and update documentation for junior Linux administrators for using systemd. Which of the following commands…

The correct answer is B. systemctl stop named. The systemd equivalent of 'service named stop' is 'systemctl stop named', following the standard systemctl syntax of subcommand then unit name.

System Management

Question

A senior systems administrator wants to standardize the commands used in the department and update documentation for junior Linux administrators for using systemd. Which of the following commands replaces the old command service named stop?

Options

  • Asystemctl kill named
  • Bsystemctl stop named
  • Csystemctl named stop
  • Dsystemctl named kill

How the community answered

(42 responses)
  • A
    2% (1)
  • B
    88% (37)
  • C
    7% (3)
  • D
    2% (1)

Why each option

The systemd equivalent of 'service named stop' is 'systemctl stop named', following the standard systemctl syntax of subcommand then unit name.

Asystemctl kill named

systemctl kill sends a raw signal (SIGKILL by default) directly to the service processes, bypassing the managed stop lifecycle that 'stop' provides.

Bsystemctl stop namedCorrect

systemctl stop named is the correct systemd replacement for the legacy SysV 'service named stop' command. The systemctl utility follows the pattern 'systemctl [subcommand] [unit]', and the stop subcommand sends a clean, managed termination signal to the named service unit rather than a raw process kill.

Csystemctl named stop

systemctl named stop reverses the required syntax - the subcommand must come before the unit name in all systemctl invocations.

Dsystemctl named kill

systemctl named kill is doubly incorrect, reversing both the subcommand order and substituting kill for stop, making it neither valid syntax nor the correct action.

Concept tested: systemd systemctl service stop command syntax

Source: https://www.freedesktop.org/software/systemd/man/systemctl.html

Topics

#systemd#systemctl#service management#init system migration

Community Discussion

No community discussion yet for this question.

Full XK0-004 Practice