In this tutorial, How do I list all services running in Linux distribution? List running service on Ubuntu Or Systemd service management. Linux the essential for DevOps Roles.
Table of Contents
Linux list services
Systemd service management
Listing services
Listing running services.
[huupv@huupv devopsroles]$ systemctl
The screen output terminal
Listing the “failed” services
[huupv@huupv devopsroles]$ systemctl --failed
The screen output terminal
Managing targets
To find the default target for your system.
[huupv@huupv devopsroles]$ systemctl get-default
Setting the default target for your system
$ sudo systemctl set-default <target-name>
Managing to autostart of services
Showing a service is enabled on system boot.
$ sudo systemctl is-enabled [service-name]
To show a service is currently active (running).
$ sudo systemctl is-active [service-name]
Enabling a service on system boot.
$ sudo systemctl enable [service-name]
Disabling a service on system boot.
$ sudo systemctl disable [service-name]
Managing services at runtime
Starting a service
$ systemctl start [service-name]
Stopping a service
$ systemctl stop [service-name]
Restarting a service
$ sudo systemctl restart [service-name]
To request the service to reload its configuration.
$ sudo systemctl reload [service-name]
Showing the current status of a service
$ sudo systemctl status [service-name]
To restart your Systemd.
$ sudo systemctl daemon-reload
List running services on the Ubuntu distribution
To get the list of the services on your system.
$ service --status-all
Conclusion
Through the article, you can use Linux list services as above. I hope will this your helpful. Thank you for reading the DevopsRoles page!