What is the purpose of service control?
Manage and monitor background services; start, stop, restart, or reload services using systemctl; check service state for troubleshooting and performance.
What does systemctl status do?
Displays current state and service details.
What is the syntax for checking service status?
systemctl status <service-name></service-name>
Give an example of checking cron service status.
systemctl status cron.service
What information does systemctl status output include?
Service description and loaded status; active state and uptime; main PID and memory usage; CGroup and process tree.
Why is systemctl status useful?
Used to identify running, inactive, or failed services.
What does systemctl start do?
Starts a service immediately; does not enable service at boot.
What is the syntax for starting a service?
sudo systemctl start <service-name></service-name>
Give an example of starting Apache service.
sudo systemctl start apache2.service
How to confirm a service started successfully?
Run systemctl status <service-name>.</service-name>
What does systemctl restart do?
Stops and starts a service in one command; used after configuration changes or to clear errors.
What is the syntax for restarting a service?
sudo systemctl restart <service-name></service-name>
Give an example of restarting UFW service.
sudo systemctl restart ufw.service
What output is shown when restarting a service?
No output if successful; status command confirms results.
What does systemctl reload do?
Reloads service configuration without stopping the service; works only if service supports dynamic reloads.
What is the syntax for reloading a service?
sudo systemctl reload <service-name></service-name>
Give an example of reloading Postfix service.
sudo systemctl reload postfix.service
What happens if reload is unsupported?
Systemd returns an error; restart is an alternative for live updates.