You can do so by checking for the existence of the launchd files in /etc: or for screen sharing: 0 sudo launchctl list com.apple.screensharing which will succeed if it’s running, hence enabled. sudo launchctl list com.apple.screensharing which will succeed if it’s running, READ MORE