在CentOS 7中,您可以使用systemctl命令来查看服务的状态。以下是一些常用的systemctl命令:
systemctl list-units --type=service
systemctl status <service_name>
例如,要查看Apache服务的状态,您可以运行:
systemctl status httpd
systemctl list-units --type=service --state=running
systemctl list-units --type=service --state=inactive
请注意,要运行这些命令,您需要具有root或sudo权限。
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: 如何通过Cobbler进行系统备份