Which command would you use to restart a service managed by systemd?

Prepare for the LPIC3 300 Mixed Environment Exam with quiz questions and detailed explanations. Sharpen your skills and ensure success!

The command used to restart a service managed by systemd is "systemctl restart servicename." This command effectively stops the specified service and then starts it again. It is a straightforward way to refresh a service's operation, allowing any configuration changes made to take effect or to recover from an unstable state.

Understanding the functionality of the command is important: "systemctl" is the primary command-line interface for managing systemd services, and "restart" is a specific verb that tells systemd to perform this action. Other commands like "reload" are used to reload configuration files without fully stopping the service, while "stop" will only disable the service, not restart it. Similarly, using the service command is typical for older init systems, and it does not operate in the same way with systemd. Hence, "systemctl restart servicename" is the correct choice for managing services under systemd.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy