Command: service
Manage macOS services and agents using launchctl
.
Usage
Usage: m service [OPTIONS]
Description: Manage macOS services using launchctl
Options:
--help Show this help message and exit
--list List all services
--info SERVICE Show information about a specific service
--start SERVICE Start a service
--stop SERVICE Stop a service
--status SERVICE Show status of a service
--enable SERVICE Enable a service
--disable SERVICE Disable a service
Options
--list
Lists all loaded services and agents on the system.
Example:
m service --list
--info SERVICE
Displays detailed information about a specific service.
Example:
m service --info com.apple.sshd
--status SERVICE
Shows the status of a specific service, including its PID if it is running.
Example:
m service --status com.apple.sshd
--start SERVICE
/ --stop SERVICE
Starts or stops a service for the current session. The service's state will revert on the next reboot. Requires sudo
privileges.
Example:
sudo m service --stop com.apple.sshd
--enable SERVICE
/ --disable SERVICE
Enables or disables a service persistently across reboots. This is equivalent to launchctl load -w
and launchctl unload -w
. Requires sudo
privileges.
Example:
sudo m service --disable com.apple.sshd