Enable Screen Sharing from the Terminal

Enable the built-in screensharing daemon so other Macs can view and control this machine over the network.

macOSlaunchctlsystemsharingMedium risk
Run `sudo launchctl enable system/com.apple.screensharing` then `sudo launchctl kickstart -k system/com.apple.screensharing` to start it immediately.

01Command

Command
$ sudo launchctl enable system/com.apple.screensharing && sudo launchctl kickstart -k system/com.apple.screensharing

02What 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

RiskMedium risk
Requirementssudo required; Screen Sharing appears in System Settings > General > Sharing once enabled.
!Warning: Leaving Screen Sharing on exposes a remote-control port; disable it when traveling.

04Undo

Undo
$ sudo launchctl disable system/com.apple.screensharing && sudo launchctl bootout system/com.apple.screensharing

05Sources

Last verified: 2026-09-18 · Category: System & Settings

06Related solutions