What command is commonly used to start, stop, or restart a service in systemd?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

The command commonly used to manage services in a systemd environment is systemctl. This utility provides a standardized interface for controlling the systemd system and service manager. With systemctl, you can start, stop, restart, enable, disable, and check the status of services, making it a powerful tool for system administrators managing various services on their Linux systems.

Using systemctl, commands can be issued in the following way:

  • To start a service: sudo systemctl start service_name

  • To stop a service: sudo systemctl stop service_name

  • To restart a service: sudo systemctl restart service_name

This command simplifies service management by integrating various functionalities into a single command. In contrast, other options like service and init either pertain to older service management methods or do not provide the full range of capabilities that systemctl offers within a systemd environment.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy