Set the Network Time Server with systemsetup

Point a Mac at an NTP time server and enable automatic clock sync from the command line with systemsetup.

macOSsystemsetuptimentpMedium risk
Run sudo systemsetup -setnetworktimeserver time.apple.com followed by sudo systemsetup -setusingnetworktime on to enable network time sync.

01Command

Command
$ sudo systemsetup -setnetworktimeserver time.apple.com && sudo systemsetup -setusingnetworktime on

02What it does

macOS keeps the clock accurate by querying an NTP (network time protocol) server, and systemsetup lets you set both the server and the on/off switch from a script. This is useful on machines where the Date & Time pane is awkward to reach, on freshly imaged Macs, or when your organisation runs its own time server. A wrong clock causes browser and App Store certificate errors, so fixing sync also fixes those.

03Risk

RiskMedium risk
RequirementsRequires administrator (sudo) privileges; on newer macOS the command prints a notice directing you to System Settings, but still applies.
!Warning: systemsetup requires sudo and will not run over normal SSH in some macOS versions without the -setremotelogin context. Pointing the Mac at an unreachable server means the clock stops syncing — keep time.apple.com unless you really run your own NTP server.

04Undo

Undo
$ sudo systemsetup -setusingnetworktime off

05Sources

  • systemsetup - Configure Machine Settings
    SS64 · technical · 2026-09-17
    Evidence: Documents systemsetup -setnetworktimeserver and -setusingnetworktime for configuring the NTP server and automatic time sync.

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