systemctl 和 service 命令只存在于 Linux 上而不存在于 Mac 上吗?

问题描述 投票:0回答:1

我正在尝试查看 Mac 上的 Apache 服务的状态。我尝试了命令:

sudo service httpd status

但我明白了

sudo: service: command not found

我用谷歌搜索并发现

systemctl
所以我尝试了:

sudo man systemctl

它显示了

No manual entry for systemctl

我注意到我没有看到太多 macOS,只在 Google 网站上看到 Linux。

systemctl
service
命令仅存在于 Linux 上,而不存在于 macOS 上吗?

如果是,这些命令的 macOS 版本是什么?

macos apache service status systemctl
1个回答
169
投票

相当于 macOS 上的 Linux

systemctl
launchctl
。 Apache 也有自己的 HTTP 服务器控制接口,
apachectl

OS X 手册页

© www.soinside.com 2019 - 2024. All rights reserved.