如何查看服务是否在 Linux 上 运行?

How to see if a service is running on Linux?

我正在使用 systemctl 进行设置,运行 我在 Linux Redhat 上进行服务。如何检查服务是否处于 运行ning 状态?

我可以用

systemctl is-active <service name> 

检查服务是否处于活动状态。但我想检查服务是否处于子状态 运行ning.

systemctl status name.service

看看这个

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/sect-managing_services_with_systemd-services

$ sudo 服务 httpd 状态

或者您可以查看服务列表

$netstat -plnt