getting a list of sudo services running code example
Example 1: ubuntu list running services
To check all running services
service --status-all | grep '\[ + \]'
To check all services (running & non running)
service --status-all
Example 2: systemctl check availabe services
# systemctl list-units --type=service
OR
# systemctl --type=service