sntp
Simple Network Time Protocol client
TLDR
SYNOPSIS
sntp [-46dhKoSs] [-a keyid] [-b bcaddress] [-c filename] [-M threshold] [-r] [server...]
DESCRIPTION
sntp is a Simple Network Time Protocol client that queries NTP servers and displays the time offset between the local system clock and the server. With appropriate privileges, it can correct the system clock.Unlike the full ntpd daemon, sntp performs one-time synchronization, making it suitable for cron jobs or scripts where continuous synchronization is unnecessary. It can either step (immediately set) or slew (gradually adjust) the clock.Output shows the time offset and error bounds in seconds, indicating how far the local clock deviates from the server.
PARAMETERS
-S, --step
Step (set) the system clock using settimeofday()-s, --slew
Slew (gradually adjust) the clock using adjtime()-4, --ipv4
Force IPv4 DNS resolution-6, --ipv6
Force IPv6 DNS resolution-r, --usereservedport
Use reserved NTP port 123 for communication-M threshold
Slew if offset is less than threshold milliseconds, otherwise step-t seconds
Timeout to wait for responses (default: 5)-d, --debug-level
Increase debug verbosity (can be specified multiple times)-K file, --kod=file
KoD (Kiss-of-Death) history file-a keyid, --authentication=keyid
Enable authentication with the specified key number-b address
Listen to the specified address for broadcast time sync-l file, --logfile=file
Log status messages to the specified file-c, --concurrent
Send concurrent queries to resolved IPs (for hostnames resolving to multiple addresses on different machines)
CAVEATS
Stepping the clock can disrupt applications depending on monotonic time. Slewing is safer but limited to small adjustments. Modern distributions often use chronyd or systemd-timesyncd instead.
HISTORY
sntp implements RFC 4330 (Simple Network Time Protocol Version 4). It is part of the NTP reference implementation but has been largely superseded by more robust alternatives like chrony and systemd-timesyncd.
SEE ALSO
ntpd(8), ntpdate(1), chronyc(1), timedatectl(1), date(1)
