tldr/pages/linux/service.md

22 lines
560 B
Markdown
Raw Permalink Normal View History

2016-11-15 11:18:32 +00:00
# service
> Manage services by running init scripts.
> The full script path should be omitted (`/etc/init.d/` is assumed).
> More information: <https://manned.org/service>.
2016-11-15 11:18:32 +00:00
- List the name and status of all services:
`service --status-all`
2016-11-15 11:18:32 +00:00
- Start/Stop/Restart/Reload service (start/stop should always be available):
`service {{service_name}} {{start|stop|restart|reload}}`
2016-11-15 11:18:32 +00:00
- Do a full restart (runs script twice with start and stop):
`service {{service_name}} --full-restart`
2016-11-15 11:18:32 +00:00
- Show the current status of a service:
`service {{service_name}} status`