systemd
General
Most Systemctl service files can be located in the following directory:
You can also use the following command to list all Systemctl service files:
List all Systemctl service files |
---|
| systemctl list-unit-files --type=service
|
Enable/disable a service
Enable a service |
---|
| systemctl enable service_name
|
Disable a service |
---|
| systemctl disable service_name
|
Start/stop/restart a service
Start a service |
---|
| systemctl start service_name
|
Stop a service |
---|
| systemctl stop service_name
|
Restart a service |
---|
| systemctl restart service_name
|
Reload a service |
---|
| systemctl reload service_name
|
Reload the systemctl daemon |
---|
| |
Checking the status of a service
Check the status of a service |
---|
| systemctl status service_name
|
Check if a service is running |
---|
| systemctl is-active service_name
|
Check if a service is enabled |
---|
| systemctl is-enabled service_name
|
Check if a service is failed |
---|
| systemctl is-failed service_name
|
List all running services |
---|
| systemctl list-units --type=service
|