Enable Screen Sharing from the Terminal
Enable the built-in screensharing daemon so other Macs can view and control this machine over the network.
01Command
$ sudo launchctl enable system/com.apple.screensharing && sudo launchctl kickstart -k system/com.apple.screensharing02What it does
Screen Sharing is a launchd service, so it can be enabled the same way any daemon is: mark the service enabled in the system domain, then kickstart it so you do not have to reboot. This is equivalent to ticking 'Screen Sharing' in System Settings > General > Sharing. The undo command disables the service again — recommended on laptops that leave the house, since an open VNC port invites connection attempts. Connections then authenticate with the user accounts and permissions set in the Sharing pane.
03Risk
04Undo
$ sudo launchctl disable system/com.apple.screensharing && sudo launchctl bootout system/com.apple.screensharing05Sources
- launchctl — interact with launchd (macOS man page)Evidence: Documents enable/disable of system-domain daemons and kickstart -k to start or restart a service now.
- launchctl kickstart examples (macOS man page)Evidence: Shows kickstart -kp style usage for restarting launchd-managed services immediately.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
Turn the terminal into a full-screen clock with optional seconds.
The modern launchctl interface — full state of any launchd job plus a restart that actually works.
See the extended ACL entries and file flags that plain ls -l and Unix chmod know nothing about.