ntpdate

sets the system date and time by querying NTP servers

TLDR

Query a time server without changing the clock
$ ntpdate -q [host]
Set the clock from a server (sync)
$ sudo ntpdate [host]
Use an unprivileged source port (firewalls)
$ sudo ntpdate -u [host]
Step the clock immediately instead of slewing
$ sudo ntpdate -b [host]

SYNOPSIS

ntpdate [options] server...

DESCRIPTION

ntpdate sets the system date and time by querying NTP (Network Time Protocol) servers. It performs a one-time synchronization, unlike ntpd which runs continuously.By default, if the time offset is small, ntpdate gradually adjusts (slews) the clock to avoid disrupting running programs. For large offsets, it steps the clock immediately. The -b flag forces stepping regardless of offset size.Multiple servers can be specified; ntpdate queries all and uses the best response.

PARAMETERS

-q

Query only; don't set the clock
-u
Use unprivileged port for outgoing packets (useful for firewalls)
-b
Force time to be stepped (abrupt change) rather than slewed (gradual)
-s
Log to syslog instead of stdout
-v
Verbose output
-d
Debug mode; don't change time, show what would happen
-t _timeout_
Timeout for server response in seconds

INSTALL

sudo apt install ntpsec-ntpdate

CAVEATS

Deprecated in favor of ntpd -q or sntp. Abrupt time changes (-b) can confuse applications expecting monotonic time. Requires root privileges to set the system clock. Not suitable for continuous synchronization; use ntpd or chronyd instead.

HISTORY

ntpdate was part of the original NTP distribution but has been deprecated since NTP 4.2.8. Modern systems typically use systemd-timesyncd, chrony, or ntpd for time synchronization.

SEE ALSO

ntpd(8), chronyc(1), timedatectl(1), sntp(8)