Answers for "services on linux"

6

list all services using systemctl

## List all services
systemctl list-units  --type=service

## List running services
systemctl list-units  --type=service  --state=running

## List all svc in simplified way
service --status-all
Posted by: Guest on May-26-2020
0

systemctl check availabe services

# systemctl list-units --type=service
OR
# systemctl --type=service
Posted by: Guest on July-01-2020
2

how to make services in linux

[Unit]
Description=<description about this service>

[Service]
User=<user e.g. root>
WorkingDirectory=<directory_of_script e.g. /root>
ExecStart=<script which needs to be executed>
Restart=always

[Install]
WantedBy=multi-user.target
Posted by: Guest on August-20-2020

Code answers related to "services on linux"

Browse Popular Code Answers by Language