Search code examples
macosapacheservicestatussystemctl

Do the systemctl and service commands exist only on Linux and not on Mac?


I'm trying to see the status of my Apache services on my Mac. I tried the command:

sudo service httpd status

but I get

sudo: service: command not found

I Googled it and discovered systemctl so I tried:

sudo man systemctl

and it shows

No manual entry for systemctl

I noticed that I didn't see much macOS and only see Linux in the websites on Google.

Does the systemctl and service commands exist on Linux only and not macOS?

If so, what is the macOS version of these commands?


Solution

  • The equivalent to Linux systemctl on macOS would be launchctl. Apache also has its own HTTP Server Control Interface, apachectl.

    OS X Man Pages