Command: ntp
Manage the Network Time Protocol (NTP) service, which synchronizes your Mac's clock with a time server.
Usage
Usage: m ntp [OPTION] [ARGUMENT]
Description: Manage the network time service on macOS
Options:
--help Show this help message
--status Show the current status of the network time service
--enable Enable the clock to use network time
--disable Disable the clock from using network time
--set HOST Set the network time server to HOST
Note: All of these commands require sudo
privileges.
Options
--status
Displays whether network time is currently enabled and which time server is being used.
Example:
sudo m ntp --status
--enable
/ --disable
Turns automatic time synchronization on or off.
Example:
sudo m ntp --enable
--set HOST
Sets the network time server to a new address. The default is time.apple.com
.
Example:
# Set the time server to a public NIST server
sudo m ntp --set time.nist.gov