snippetbashTip
service — Manage services by running init scripts. The full script path should be omitted (`/etc/init.d/` is a
Viewed 0 times
commandservicesinitclimanagerunningservicescripts
linux
Problem
How to use the
service command: Manage services by running init scripts. The full script path should be omitted (/etc/init.d/ is assumed). More information: <https://manned.org/service>.Solution
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>.List the name and status of all services:
service --status-allStart/Stop/Restart/Reload service (start/stop should always be available):
service {{service_name}} {{start|stop|restart|reload}}Do a full restart (runs script twice with start and stop):
service {{service_name}} --full-restartShow the current status of a service:
service {{service_name}} statusCode Snippets
List the name and status of all services
service --status-allStart/Stop/Restart/Reload service (start/stop should always be available)
service {{service_name}} {{start|stop|restart|reload}}Do a full restart (runs script twice with start and stop)
service {{service_name}} --full-restartShow the current status of a service
service {{service_name}} statusContext
tldr-pages: linux/service
Revisions (0)
No revisions yet.